gitlab-org--gitlab-foss/lib/gitlab/sidekiq_status/client_middleware.rb
James Lopez 58371efbb0 Periodically mark projects that are stuck in importing as failed
Adds import jid to projects
Refactor middleware to set custom expiration time via sidekiq options
Add completed_jids option to sidekiq status and a few other changes
2017-04-05 16:11:51 +02:00

12 lines
299 B
Ruby

module Gitlab
module SidekiqStatus
class ClientMiddleware
def call(_, job, _, _)
status_expiration = job['status_expiration'] || Gitlab::SidekiqStatus::DEFAULT_EXPIRATION
Gitlab::SidekiqStatus.set(job['jid'], status_expiration)
yield
end
end
end
end