Skip to content
Snippets Groups Projects
Commit 33795139 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent c7e385e2
No related branches found
No related tags found
No related merge requests found
Showing
with 32 additions and 30 deletions
# frozen_string_literal: true
 
class AuthorizedProjectsWorker
class AuthorizedProjectsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
prepend WaitableWorker
 
Loading
Loading
# frozen_string_literal: true
 
module AutoDevops
class DisableWorker
class DisableWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include AutoDevopsQueue
 
Loading
Loading
# frozen_string_literal: true
 
class AutoMergeProcessWorker
class AutoMergeProcessWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
 
queue_namespace :auto_merge
Loading
Loading
# frozen_string_literal: true
 
class BackgroundMigrationWorker
class BackgroundMigrationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
 
feature_category_not_owned!
Loading
Loading
@@ -22,17 +22,19 @@ class BackgroundMigrationWorker
# class_name - The class name of the background migration to run.
# arguments - The arguments to pass to the migration class.
def perform(class_name, arguments = [])
should_perform, ttl = perform_and_ttl(class_name)
with_context(caller_id: class_name.to_s) do
should_perform, ttl = perform_and_ttl(class_name)
 
if should_perform
Gitlab::BackgroundMigration.perform(class_name, arguments)
else
# If the lease could not be obtained this means either another process is
# running a migration of this class or we ran one recently. In this case
# we'll reschedule the job in such a way that it is picked up again around
# the time the lease expires.
self.class
.perform_in(ttl || self.class.minimum_interval, class_name, arguments)
if should_perform
Gitlab::BackgroundMigration.perform(class_name, arguments)
else
# If the lease could not be obtained this means either another process is
# running a migration of this class or we ran one recently. In this case
# we'll reschedule the job in such a way that it is picked up again around
# the time the lease expires.
self.class
.perform_in(ttl || self.class.minimum_interval, class_name, arguments)
end
end
end
 
Loading
Loading
# frozen_string_literal: true
 
class BuildCoverageWorker
class BuildCoverageWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
 
Loading
Loading
# frozen_string_literal: true
 
class BuildFinishedWorker
class BuildFinishedWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
 
Loading
Loading
# frozen_string_literal: true
 
class BuildHooksWorker
class BuildHooksWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
 
Loading
Loading
# frozen_string_literal: true
 
class BuildQueueWorker
class BuildQueueWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
 
Loading
Loading
# frozen_string_literal: true
 
class BuildSuccessWorker
class BuildSuccessWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
 
Loading
Loading
# frozen_string_literal: true
 
class BuildTraceSectionsWorker
class BuildTraceSectionsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
 
Loading
Loading
# frozen_string_literal: true
 
module Chaos
class CpuSpinWorker
class CpuSpinWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ChaosQueue
 
Loading
Loading
# frozen_string_literal: true
 
module Chaos
class DbSpinWorker
class DbSpinWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ChaosQueue
 
Loading
Loading
# frozen_string_literal: true
 
module Chaos
class KillWorker
class KillWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ChaosQueue
 
Loading
Loading
# frozen_string_literal: true
 
module Chaos
class LeakMemWorker
class LeakMemWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ChaosQueue
 
Loading
Loading
# frozen_string_literal: true
 
module Chaos
class SleepWorker
class SleepWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ChaosQueue
 
Loading
Loading
# frozen_string_literal: true
 
class ChatNotificationWorker
class ChatNotificationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
 
TimeoutExceeded = Class.new(StandardError)
Loading
Loading
# frozen_string_literal: true
 
module Ci
class ArchiveTracesCronWorker
class ArchiveTracesCronWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
 
Loading
Loading
# frozen_string_literal: true
 
module Ci
class BuildPrepareWorker
class BuildPrepareWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
 
Loading
Loading
# frozen_string_literal: true
 
module Ci
class BuildScheduleWorker
class BuildScheduleWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
 
Loading
Loading
# frozen_string_literal: true
 
module Ci
class BuildTraceChunkFlushWorker
class BuildTraceChunkFlushWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineBackgroundQueue
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment