diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-10 15:08:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-10 15:08:59 +0300 |
commit | 7351a484d79236b7e9d47c86f2fcc970b7ae10b0 (patch) | |
tree | 651b5fca7ea0460e3ce7c687cfa9e3a3b37eefc8 /app/workers | |
parent | b4ded0ba7b4d2cdbed5b1f331cf2083a25ee4d7c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/admin_email_worker.rb | 5 | ||||
-rw-r--r-- | app/workers/all_queues.yml | 6 | ||||
-rw-r--r-- | app/workers/ci/create_cross_project_pipeline_worker.rb | 18 | ||||
-rw-r--r-- | app/workers/expire_build_artifacts_worker.rb | 5 | ||||
-rw-r--r-- | app/workers/gitlab_usage_ping_worker.rb | 5 | ||||
-rw-r--r-- | app/workers/import_export_project_cleanup_worker.rb | 5 | ||||
-rw-r--r-- | app/workers/prune_old_events_worker.rb | 5 | ||||
-rw-r--r-- | app/workers/prune_web_hook_logs_worker.rb | 5 | ||||
-rw-r--r-- | app/workers/remove_unreferenced_lfs_objects_worker.rb | 5 | ||||
-rw-r--r-- | app/workers/repository_archive_cache_worker.rb | 5 | ||||
-rw-r--r-- | app/workers/repository_check/dispatch_worker.rb | 5 | ||||
-rw-r--r-- | app/workers/requests_profiles_worker.rb | 5 | ||||
-rw-r--r-- | app/workers/stuck_import_jobs_worker.rb | 6 | ||||
-rw-r--r-- | app/workers/trending_projects_worker.rb | 4 |
14 files changed, 73 insertions, 11 deletions
diff --git a/app/workers/admin_email_worker.rb b/app/workers/admin_email_worker.rb index 074b59414ab..a7cc4fb0d11 100644 --- a/app/workers/admin_email_worker.rb +++ b/app/workers/admin_email_worker.rb @@ -2,7 +2,10 @@ class AdminEmailWorker include ApplicationWorker - include CronjobQueue # rubocop:disable Scalability/CronWorkerContext + # rubocop:disable Scalability/CronWorkerContext + # This worker does not perform work scoped to a context + include CronjobQueue + # rubocop:enable Scalability/CronWorkerContext feature_category_not_owned! diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml index 51b91e8e8be..e836dd92770 100644 --- a/app/workers/all_queues.yml +++ b/app/workers/all_queues.yml @@ -531,6 +531,12 @@ :latency_sensitive: :resource_boundary: :unknown :weight: 3 +- :name: pipeline_default:ci_create_cross_project_pipeline + :feature_category: :continuous_integration + :has_external_dependencies: + :latency_sensitive: + :resource_boundary: :cpu + :weight: 3 - :name: pipeline_default:ci_pipeline_bridge_status :feature_category: :continuous_integration :has_external_dependencies: diff --git a/app/workers/ci/create_cross_project_pipeline_worker.rb b/app/workers/ci/create_cross_project_pipeline_worker.rb new file mode 100644 index 00000000000..91e9317713e --- /dev/null +++ b/app/workers/ci/create_cross_project_pipeline_worker.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module Ci + class CreateCrossProjectPipelineWorker + include ::ApplicationWorker + include ::PipelineQueue + + worker_resource_boundary :cpu + + def perform(bridge_id) + ::Ci::Bridge.find_by_id(bridge_id).try do |bridge| + ::Ci::CreateCrossProjectPipelineService + .new(bridge.project, bridge.user) + .execute(bridge) + end + end + end +end diff --git a/app/workers/expire_build_artifacts_worker.rb b/app/workers/expire_build_artifacts_worker.rb index ee57bd6dfe2..07f516a3390 100644 --- a/app/workers/expire_build_artifacts_worker.rb +++ b/app/workers/expire_build_artifacts_worker.rb @@ -2,7 +2,10 @@ class ExpireBuildArtifactsWorker include ApplicationWorker - include CronjobQueue # rubocop:disable Scalability/CronWorkerContext + # rubocop:disable Scalability/CronWorkerContext + # This worker does not perform work scoped to a context + include CronjobQueue + # rubocop:enable Scalability/CronWorkerContext feature_category :continuous_integration diff --git a/app/workers/gitlab_usage_ping_worker.rb b/app/workers/gitlab_usage_ping_worker.rb index 577293c2d8d..bf0dc0fdd59 100644 --- a/app/workers/gitlab_usage_ping_worker.rb +++ b/app/workers/gitlab_usage_ping_worker.rb @@ -4,7 +4,10 @@ class GitlabUsagePingWorker LEASE_TIMEOUT = 86400 include ApplicationWorker - include CronjobQueue # rubocop:disable Scalability/CronWorkerContext + # rubocop:disable Scalability/CronWorkerContext + # This worker does not perform work scoped to a context + include CronjobQueue + # rubocop:enable Scalability/CronWorkerContext feature_category_not_owned! diff --git a/app/workers/import_export_project_cleanup_worker.rb b/app/workers/import_export_project_cleanup_worker.rb index 8a018024e95..ae236fa1fcd 100644 --- a/app/workers/import_export_project_cleanup_worker.rb +++ b/app/workers/import_export_project_cleanup_worker.rb @@ -2,7 +2,10 @@ class ImportExportProjectCleanupWorker include ApplicationWorker - include CronjobQueue # rubocop:disable Scalability/CronWorkerContext + # rubocop:disable Scalability/CronWorkerContext + # This worker does not perform work scoped to a context + include CronjobQueue + # rubocop:enable Scalability/CronWorkerContext feature_category :importers diff --git a/app/workers/prune_old_events_worker.rb b/app/workers/prune_old_events_worker.rb index 1a54b85a384..835c51ec846 100644 --- a/app/workers/prune_old_events_worker.rb +++ b/app/workers/prune_old_events_worker.rb @@ -2,7 +2,10 @@ class PruneOldEventsWorker include ApplicationWorker - include CronjobQueue # rubocop:disable Scalability/CronWorkerContext + # rubocop:disable Scalability/CronWorkerContext + # This worker does not perform work scoped to a context + include CronjobQueue + # rubocop:enable Scalability/CronWorkerContext feature_category_not_owned! diff --git a/app/workers/prune_web_hook_logs_worker.rb b/app/workers/prune_web_hook_logs_worker.rb index 7d128a6f1ac..dd4f16a69da 100644 --- a/app/workers/prune_web_hook_logs_worker.rb +++ b/app/workers/prune_web_hook_logs_worker.rb @@ -4,7 +4,10 @@ # table. class PruneWebHookLogsWorker include ApplicationWorker - include CronjobQueue # rubocop:disable Scalability/CronWorkerContext + # rubocop:disable Scalability/CronWorkerContext + # This worker does not perform work scoped to a context + include CronjobQueue + # rubocop:enable Scalability/CronWorkerContext feature_category :integrations diff --git a/app/workers/remove_unreferenced_lfs_objects_worker.rb b/app/workers/remove_unreferenced_lfs_objects_worker.rb index b2d2223c64d..5e3998f3915 100644 --- a/app/workers/remove_unreferenced_lfs_objects_worker.rb +++ b/app/workers/remove_unreferenced_lfs_objects_worker.rb @@ -2,7 +2,10 @@ class RemoveUnreferencedLfsObjectsWorker include ApplicationWorker - include CronjobQueue # rubocop:disable Scalability/CronWorkerContext + # rubocop:disable Scalability/CronWorkerContext + # This worker does not perform work scoped to a context + include CronjobQueue + # rubocop:enable Scalability/CronWorkerContext feature_category :git_lfs diff --git a/app/workers/repository_archive_cache_worker.rb b/app/workers/repository_archive_cache_worker.rb index bbeb9d9eace..76e08a80c15 100644 --- a/app/workers/repository_archive_cache_worker.rb +++ b/app/workers/repository_archive_cache_worker.rb @@ -2,7 +2,10 @@ class RepositoryArchiveCacheWorker include ApplicationWorker - include CronjobQueue # rubocop:disable Scalability/CronWorkerContext + # rubocop:disable Scalability/CronWorkerContext + # This worker does not perform work scoped to a context + include CronjobQueue + # rubocop:enable Scalability/CronWorkerContext feature_category :source_code_management diff --git a/app/workers/repository_check/dispatch_worker.rb b/app/workers/repository_check/dispatch_worker.rb index ca1a82ed160..f68be8832eb 100644 --- a/app/workers/repository_check/dispatch_worker.rb +++ b/app/workers/repository_check/dispatch_worker.rb @@ -3,7 +3,10 @@ module RepositoryCheck class DispatchWorker include ApplicationWorker - include CronjobQueue # rubocop:disable Scalability/CronWorkerContext + # rubocop:disable Scalability/CronWorkerContext + # This worker does not perform work scoped to a context + include CronjobQueue + # rubocop:enable Scalability/CronWorkerContext include ::EachShardWorker include ExclusiveLeaseGuard diff --git a/app/workers/requests_profiles_worker.rb b/app/workers/requests_profiles_worker.rb index 593451eb16b..b711cb99082 100644 --- a/app/workers/requests_profiles_worker.rb +++ b/app/workers/requests_profiles_worker.rb @@ -2,7 +2,10 @@ class RequestsProfilesWorker include ApplicationWorker - include CronjobQueue # rubocop:disable Scalability/CronWorkerContext + # rubocop:disable Scalability/CronWorkerContext + # This worker does not perform work scoped to a context + include CronjobQueue + # rubocop:enable Scalability/CronWorkerContext feature_category :source_code_management diff --git a/app/workers/stuck_import_jobs_worker.rb b/app/workers/stuck_import_jobs_worker.rb index 4a72fcedee3..c9675417aa4 100644 --- a/app/workers/stuck_import_jobs_worker.rb +++ b/app/workers/stuck_import_jobs_worker.rb @@ -2,7 +2,11 @@ class StuckImportJobsWorker include ApplicationWorker - include CronjobQueue # rubocop:disable Scalability/CronWorkerContext + # rubocop:disable Scalability/CronWorkerContext + # This worker updates several import states inline and does not schedule + # other jobs. So no context needed + include CronjobQueue + # rubocop:enable Scalability/CronWorkerContext feature_category :importers worker_resource_boundary :cpu diff --git a/app/workers/trending_projects_worker.rb b/app/workers/trending_projects_worker.rb index 5db661dd0e6..208d8b3b9b5 100644 --- a/app/workers/trending_projects_worker.rb +++ b/app/workers/trending_projects_worker.rb @@ -2,6 +2,10 @@ class TrendingProjectsWorker include ApplicationWorker + # rubocop:disable Scalability/CronWorkerContext + # This worker does not perform work scoped to a context + include CronjobQueue + # rubocop:enable Scalability/CronWorkerContext include CronjobQueue # rubocop:disable Scalability/CronWorkerContext feature_category :source_code_management |