gitlab-org--gitlab-foss/app/workers
Stan Hu bf4455d146 Merge branch 'dont-drop-stuck-builds' into 'master'
Don't fail builds for projects that are deleted when they are stuck

## What does this MR do?

Solves when dropping stuck connection.
```
Dropping stuck pending build 1545510 for runner 
NoMethodError: undefined method `origin_merge_requests' for nil:NilClass
    from /opt/gitlab/embedded/service/gitlab-rails/app/services/merge_requests/base_service.rb:50:in `merge_request_from'
    from /opt/gitlab/embedded/service/gitlab-rails/app/services/merge_requests/base_service.rb:57:in `each_merge_request'
    from /opt/gitlab/embedded/service/gitlab-rails/app/services/merge_requests/add_todo_when_build_fails_service.rb:5:in `execute'
    from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/instrumentation.rb:164:in `execute'
    from /opt/gitlab/embedded/service/gitlab-rails/app/models/commit_status.rb:51:in `block (2 levels) in <class:CommitStatus>'
    from /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/state_machines-0.4.0/lib/state_machines/eval_helpers.rb:79:in `call'
...
```

This happens, because that `default_scope` of `Projects` filters returns the projects that are not deleted, where `Ci::Build` doesn't take into account.


See merge request !4609
2016-06-15 02:54:19 +00:00
..
repository_check Merge branch 'create-wikis-during-check' into 'master' 2016-05-04 14:10:49 +00:00
admin_email_worker.rb Rename almost all the things 2016-04-06 13:47:05 +02:00
build_email_worker.rb Migrate CI WebHooks and Emails to new tables 2015-12-10 16:04:08 +01:00
delete_user_worker.rb Add ability to delete a user with force 2016-03-15 21:09:25 +01:00
email_receiver_worker.rb fix specs 2015-11-30 16:12:31 +02:00
emails_on_push_worker.rb Make EmailsOnPushWorker use Sidekiq mailers queue 2016-05-31 15:06:08 -07:00
expire_build_artifacts_worker.rb Test ExpireBuildArtifactsWorker 2016-06-13 11:07:23 +01:00
gitlab_shell_one_shot_worker.rb Do not retry "git gc" 2016-03-17 11:02:11 +01:00
gitlab_shell_worker.rb replace Gitolited mixin with Gitlab::ShellAdapter 2013-03-21 21:01:14 +02:00
irker_worker.rb Use Gitlab::Git::DiffCollections 2016-03-03 18:38:44 +01:00
merge_worker.rb API support, incorporated feedback 2015-11-18 11:17:41 +01:00
new_note_worker.rb [WIP] Background process note logic for #3948 2016-01-28 13:04:42 -05:00
post_receive.rb Refactor GitTagPushService and fig tags_push system event hook 2016-04-19 11:00:30 +02:00
project_cache_worker.rb Check if repo exists before attempting to update cache info 2016-03-27 06:17:49 -07:00
project_destroy_worker.rb Exclude projects pending deletion from all results 2016-03-31 20:20:18 +02:00
project_service_worker.rb Fix async services execution broken in 7.6 2014-12-29 17:48:43 +02:00
project_web_hook_worker.rb Added X-GitLab-Event header for web hooks 2015-05-08 16:49:03 +03:00
repository_archive_cache_worker.rb Clear archive cache asynchronously 2015-10-20 16:53:37 +02:00
repository_fork_worker.rb some refactoring and fixing spec 2016-06-02 21:48:25 -04:00
repository_import_worker.rb Update repository_import_worker.rb 2016-06-02 21:48:27 -04:00
stuck_ci_builds_worker.rb Don't fail builds for projects that are deleted when they are stuck 2016-06-12 15:15:58 +02:00
system_hook_worker.rb Added X-GitLab-Event header for web hooks 2015-05-08 16:49:03 +03:00