summaryrefslogtreecommitdiff
path: root/app/workers/concerns/gitlab/github_import/queue.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/concerns/gitlab/github_import/queue.rb')
-rw-r--r--app/workers/concerns/gitlab/github_import/queue.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/workers/concerns/gitlab/github_import/queue.rb b/app/workers/concerns/gitlab/github_import/queue.rb
new file mode 100644
index 00000000000..22c2ce458e8
--- /dev/null
+++ b/app/workers/concerns/gitlab/github_import/queue.rb
@@ -0,0 +1,18 @@
+module Gitlab
+ module GithubImport
+ module Queue
+ extend ActiveSupport::Concern
+
+ included do
+ queue_namespace :github_importer
+
+ # If a job produces an error it may block a stage from advancing
+ # forever. To prevent this from happening we prevent jobs from going to
+ # the dead queue. This does mean some resources may not be imported, but
+ # this is better than a project being stuck in the "import" state
+ # forever.
+ sidekiq_options dead: false, retry: 5
+ end
+ end
+ end
+end