Commit cc99d981 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'add-idempotency-cop-for-workers' into 'master'

Introduce `idempotent` worker attribute with new Cop

See merge request gitlab-org/gitlab!25202
parents fb6d5bd6 f78af0fc
# frozen_string_literal: true
class AdminEmailWorker
class AdminEmailWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
......
......@@ -9,1077 +9,1257 @@
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: auto_merge:auto_merge_process
:feature_category: :continuous_delivery
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :cpu
:weight: 3
:idempotent:
- :name: chaos:chaos_cpu_spin
:feature_category: :chaos_engineering
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: chaos:chaos_db_spin
:feature_category: :chaos_engineering
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: chaos:chaos_kill
:feature_category: :chaos_engineering
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: chaos:chaos_leak_mem
:feature_category: :chaos_engineering
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: chaos:chaos_sleep
:feature_category: :chaos_engineering
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: container_repository:cleanup_container_repository
:feature_category: :container_registry
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: container_repository:delete_container_repository
:feature_category: :container_registry
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:admin_email
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:ci_archive_traces_cron
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:container_expiration_policy
:feature_category: :container_registry
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:environments_auto_stop_cron
:feature_category: :continuous_delivery
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:expire_build_artifacts
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:gitlab_usage_ping
:feature_category: :collection
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:import_export_project_cleanup
:feature_category: :importers
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:issue_due_scheduler
:feature_category: :issue_tracking
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:namespaces_prune_aggregation_schedules
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :cpu
:weight: 1
:idempotent:
- :name: cronjob:pages_domain_removal_cron
:feature_category: :pages
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :cpu
:weight: 1
:idempotent:
- :name: cronjob:pages_domain_ssl_renewal_cron
:feature_category: :pages
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:pages_domain_verification_cron
:feature_category: :pages
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:personal_access_tokens_expiring
:feature_category: :authentication_and_authorization
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:pipeline_schedule
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :cpu
:weight: 1
:idempotent:
- :name: cronjob:prune_old_events
:feature_category: :users
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:prune_web_hook_logs
:feature_category: :integrations
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:remove_expired_group_links
:feature_category: :authentication_and_authorization
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:remove_expired_members
:feature_category: :authentication_and_authorization
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :cpu
:weight: 1
:idempotent:
- :name: cronjob:remove_unreferenced_lfs_objects
:feature_category: :git_lfs
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:repository_archive_cache
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:repository_check_dispatch
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:requests_profiles
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:schedule_migrate_external_diffs
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:stuck_ci_jobs
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :cpu
:weight: 1
:idempotent:
- :name: cronjob:stuck_import_jobs
:feature_category: :importers
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :cpu
:weight: 1
:idempotent:
- :name: cronjob:stuck_merge_jobs
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:trending_projects
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: deployment:deployments_finished
:feature_category: :continuous_delivery
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :cpu
:weight: 3
:idempotent:
- :name: deployment:deployments_forward_deployment
:feature_category: :continuous_delivery
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 3
:idempotent:
- :name: deployment:deployments_success
:feature_category: :continuous_delivery
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :cpu
:weight: 3
:idempotent:
- :name: gcp_cluster:cluster_configure
:feature_category: :kubernetes_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: gcp_cluster:cluster_configure_istio
:feature_category: :kubernetes_management
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: gcp_cluster:cluster_install_app
:feature_category: :kubernetes_management
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: gcp_cluster:cluster_patch_app
:feature_category: :kubernetes_management
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: gcp_cluster:cluster_project_configure
:feature_category: :kubernetes_management
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: gcp_cluster:cluster_provision
:feature_category: :kubernetes_management
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: gcp_cluster:cluster_upgrade_app
:feature_category: :kubernetes_management
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: gcp_cluster:cluster_wait_for_app_installation
:feature_category: :kubernetes_management
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :cpu
:weight: 1
:idempotent:
- :name: gcp_cluster:cluster_wait_for_ingress_ip_address
:feature_category: :kubernetes_management
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: gcp_cluster:clusters_applications_activate_service
:feature_category: :kubernetes_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: gcp_cluster:clusters_applications_deactivate_service
:feature_category: :kubernetes_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: gcp_cluster:clusters_applications_uninstall
:feature_category: :kubernetes_management
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: gcp_cluster:clusters_applications_wait_for_uninstall_app
:feature_category: :kubernetes_management
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :cpu
:weight: 1
:idempotent:
- :name: gcp_cluster:clusters_cleanup_app
:feature_category: :kubernetes_management
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: gcp_cluster:clusters_cleanup_project_namespace
:feature_category: :kubernetes_management
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: gcp_cluster:clusters_cleanup_service_account
:feature_category: :kubernetes_management
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: gcp_cluster:wait_for_cluster_creation
:feature_category: :kubernetes_management
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: github_importer:github_import_import_diff_note
:feature_category: :importers
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: github_importer:github_import_import_issue
:feature_category: :importers
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: github_importer:github_import_import_lfs_object
:feature_category: :importers
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: github_importer:github_import_import_note
:feature_category: :importers
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: github_importer:github_import_import_pull_request
:feature_category: :importers
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: github_importer:github_import_refresh_import_jid
:feature_category: :importers
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: github_importer:github_import_stage_finish_import
:feature_category: :importers
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: github_importer:github_import_stage_import_base_data
:feature_category: :importers
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: github_importer:github_import_stage_import_issues_and_diff_notes
:feature_category: :importers
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: github_importer:github_import_stage_import_lfs_objects
:feature_category: :importers
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: github_importer:github_import_stage_import_notes
:feature_category: :importers
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: github_importer:github_import_stage_import_pull_requests
:feature_category: :importers
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: github_importer:github_import_stage_import_repository
:feature_category: :importers
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: hashed_storage:hashed_storage_migrator
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: hashed_storage:hashed_storage_project_migrate
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: hashed_storage:hashed_storage_project_rollback
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: hashed_storage:hashed_storage_rollbacker
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: incident_management:incident_management_process_alert
:feature_category: :incident_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: mail_scheduler:mail_scheduler_issue_due
:feature_category: :issue_tracking
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: mail_scheduler:mail_scheduler_notification_service
:feature_category: :issue_tracking
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :cpu
:weight: 2
:idempotent:
- :name: notifications:new_release
:feature_category: :release_orchestration
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: object_pool:object_pool_create
:feature_category: :gitaly
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: object_pool:object_pool_destroy
:feature_category: :gitaly
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: object_pool:object_pool_join
:feature_category: :gitaly
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :cpu
:weight: 1
:idempotent:
- :name: object_pool:object_pool_schedule_join
:feature_category: :gitaly
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: object_storage:object_storage_background_move
:feature_category: :not_owned
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: object_storage:object_storage_migrate_uploads
:feature_category: :not_owned
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: pipeline_background:archive_trace
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: pipeline_background:ci_build_trace_chunk_flush
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: pipeline_cache:expire_job_cache
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :unknown
:weight: 3
:idempotent: true
- :name: pipeline_cache:expire_pipeline_cache
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :cpu
:weight: 3
:idempotent:
- :name: pipeline_creation:create_pipeline
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :cpu
:weight: 4
:idempotent:
- :name: pipeline_creation:run_pipeline_schedule
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 4
:idempotent:
- :name: pipeline_default:build_coverage
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 3
:idempotent:
- :name: pipeline_default:build_trace_sections
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 3
:idempotent:
- :name: pipeline_default:ci_create_cross_project_pipeline
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :cpu
:weight: 3
:idempotent:
- :name: pipeline_default:ci_pipeline_bridge_status
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :cpu
:weight: 3
:idempotent:
- :name: pipeline_default:pipeline_metrics
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :unknown
:weight: 3
:idempotent:
- :name: pipeline_default:pipeline_notification
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :cpu
:weight: 3
:idempotent:
- :name: pipeline_hooks:build_hooks
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: pipeline_hooks:pipeline_hooks
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :cpu
:weight: 2
:idempotent:
- :name: pipeline_processing:build_finished
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :cpu
:weight: 5
:idempotent:
- :name: pipeline_processing:build_queue
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :cpu
:weight: 5
:idempotent:
- :name: pipeline_processing:build_success
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :unknown
:weight: 5
:idempotent:
- :name: pipeline_processing:ci_build_prepare
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 5
:idempotent:
- :name: pipeline_processing:ci_build_schedule
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :cpu
:weight: 5
:idempotent:
- :name: pipeline_processing:ci_resource_groups_assign_resource_from_resource_group
:feature_category: :continuous_delivery
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 5
:idempotent:
- :name: pipeline_processing:pipeline_process
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :unknown
:weight: 5
:idempotent:
- :name: pipeline_processing:pipeline_success
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :unknown
:weight: 5
:idempotent:
- :name: pipeline_processing:pipeline_update
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :unknown
:weight: 5
:idempotent:
- :name: pipeline_processing:stage_update
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :unknown
:weight: 5
:idempotent:
- :name: pipeline_processing:update_head_pipeline_for_merge_request
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :cpu
:weight: 5
:idempotent:
- :name: repository_check:repository_check_batch
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: repository_check:repository_check_clear
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: repository_check:repository_check_single_repository
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: todos_destroyer:todos_destroyer_confidential_issue
:feature_category: :issue_tracking
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: todos_destroyer:todos_destroyer_entity_leave
:feature_category: :issue_tracking
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: todos_destroyer:todos_destroyer_group_private
:feature_category: :issue_tracking
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: todos_destroyer:todos_destroyer_private_features
:feature_category: :issue_tracking
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: todos_destroyer:todos_destroyer_project_private
:feature_category: :issue_tracking
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: update_namespace_statistics:namespaces_root_statistics
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: update_namespace_statistics:namespaces_schedule_aggregation
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: authorized_projects
:feature_category: :authentication_and_authorization
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: background_migration
:feature_category: :not_owned
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: chat_notification
:feature_category: :chatops
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: create_commit_signature
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: create_evidence
:feature_category: :release_governance
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: create_note_diff_file
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: default
:feature_category:
:has_external_dependencies:
:latency_sensitive:
:resource_boundary:
:weight: 1
:idempotent:
- :name: delete_diff_files
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: delete_merged_branches
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: delete_stored_files
:feature_category: :not_owned
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: delete_user
:feature_category: :authentication_and_authorization
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: detect_repository_languages
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: email_receiver
:feature_category: :issue_tracking
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: emails_on_push
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :cpu
:weight: 2
:idempotent:
- :name: error_tracking_issue_link
:feature_category: :error_tracking
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: expire_build_instance_artifacts
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: file_hook
:feature_category: :integrations
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: git_garbage_collect
:feature_category: :gitaly
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: github_import_advance_stage
:feature_category: :importers
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: gitlab_shell
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: group_destroy
:feature_category: :subgroups
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: group_export
:feature_category: :importers
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: group_import
:feature_category: :importers
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: import_issues_csv
:feature_category: :issue_tracking
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :cpu
:weight: 2
:idempotent:
- :name: invalid_gpg_signature_update
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: irker
:feature_category: :integrations
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: mailers
:feature_category:
:has_external_dependencies:
:latency_sensitive:
:resource_boundary:
:weight: 2
:idempotent:
- :name: merge
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :unknown
:weight: 5
:idempotent:
- :name: merge_request_mergeability_check
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: migrate_external_diffs
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: namespaceless_project_destroy
:feature_category: :authentication_and_authorization
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: new_issue
:feature_category: :issue_tracking
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :cpu
:weight: 2
:idempotent:
- :name: new_merge_request
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :cpu
:weight: 2
:idempotent:
- :name: new_note
:feature_category: :issue_tracking
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :cpu
:weight: 2
:idempotent:
- :name: pages
:feature_category: :pages
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: pages_domain_ssl_renewal
:feature_category: :pages
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: pages_domain_verification
:feature_category: :pages
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: phabricator_import_import_tasks
:feature_category: :importers
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: post_receive
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :cpu
:weight: 5
:idempotent:
- :name: process_commit
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :unknown
:weight: 3
:idempotent:
- :name: project_cache
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: project_daily_statistics
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: project_destroy
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: project_export
:feature_category: :importers
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :memory
:weight: 1
:idempotent:
- :name: project_service
:feature_category: :integrations
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: propagate_service_template
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: reactive_caching
:feature_category: :not_owned
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :cpu
:weight: 1
:idempotent:
- :name: rebase
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: remote_mirror_notification
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: repository_cleanup
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: repository_fork
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: repository_import
:feature_category: :importers
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: repository_remove_remote
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: repository_update_remote_mirror
:feature_category: :source_code_management
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: self_monitoring_project_create
:feature_category: :metrics
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: self_monitoring_project_delete
:feature_category: :metrics
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: system_hook_push
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: update_external_pull_requests
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 3
:idempotent:
- :name: update_merge_requests
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :cpu
:weight: 3
:idempotent:
- :name: update_project_statistics
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: upload_checksum
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: web_hook
:feature_category: :integrations
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
# frozen_string_literal: true
class ArchiveTraceWorker
class ArchiveTraceWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineBackgroundQueue
......
# frozen_string_literal: true
class AuthorizedProjectsWorker
class AuthorizedProjectsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
prepend WaitableWorker
......
# frozen_string_literal: true
module AutoDevops
class DisableWorker
class DisableWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include AutoDevopsQueue
......
# frozen_string_literal: true
class AutoMergeProcessWorker
class AutoMergeProcessWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :auto_merge
......
# frozen_string_literal: true
class BackgroundMigrationWorker
class BackgroundMigrationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category_not_owned!
......
# frozen_string_literal: true
class BuildCoverageWorker
class BuildCoverageWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class BuildFinishedWorker
class BuildFinishedWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class BuildHooksWorker
class BuildHooksWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class BuildQueueWorker
class BuildQueueWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class BuildSuccessWorker
class BuildSuccessWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class BuildTraceSectionsWorker
class BuildTraceSectionsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
module Chaos
class CpuSpinWorker
class CpuSpinWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ChaosQueue
......
# frozen_string_literal: true
module Chaos
class DbSpinWorker
class DbSpinWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ChaosQueue
......
# frozen_string_literal: true
module Chaos
class KillWorker
class KillWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ChaosQueue
......
# frozen_string_literal: true
module Chaos
class LeakMemWorker
class LeakMemWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ChaosQueue
......
# frozen_string_literal: true
module Chaos
class SleepWorker
class SleepWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ChaosQueue
......
# frozen_string_literal: true
class ChatNotificationWorker
class ChatNotificationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
TimeoutExceeded = Class.new(StandardError)
......
# frozen_string_literal: true
module Ci
class ArchiveTracesCronWorker
class ArchiveTracesCronWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
......
# frozen_string_literal: true
module Ci
class BuildPrepareWorker
class BuildPrepareWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
module Ci
class BuildScheduleWorker
class BuildScheduleWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
module Ci
class BuildTraceChunkFlushWorker
class BuildTraceChunkFlushWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineBackgroundQueue
......
# frozen_string_literal: true
module Ci
class CreateCrossProjectPipelineWorker
class CreateCrossProjectPipelineWorker # rubocop:disable Scalability/IdempotentWorker
include ::ApplicationWorker
include ::PipelineQueue
......
# frozen_string_literal: true
module Ci
class PipelineBridgeStatusWorker
class PipelineBridgeStatusWorker # rubocop:disable Scalability/IdempotentWorker
include ::ApplicationWorker
include ::PipelineQueue
......
......@@ -2,7 +2,7 @@
module Ci
module ResourceGroups
class AssignResourceFromResourceGroupWorker
class AssignResourceFromResourceGroupWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class CleanupContainerRepositoryWorker
class CleanupContainerRepositoryWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :container_repository
......
# frozen_string_literal: true
class ClusterConfigureIstioWorker
class ClusterConfigureIstioWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ClusterQueue
......
# frozen_string_literal: true
class ClusterConfigureWorker
class ClusterConfigureWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ClusterQueue
......
# frozen_string_literal: true
class ClusterInstallAppWorker
class ClusterInstallAppWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ClusterQueue
include ClusterApplications
......
# frozen_string_literal: true
class ClusterPatchAppWorker
class ClusterPatchAppWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ClusterQueue
include ClusterApplications
......
# frozen_string_literal: true
class ClusterProjectConfigureWorker
class ClusterProjectConfigureWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ClusterQueue
......
# frozen_string_literal: true
class ClusterProvisionWorker
class ClusterProvisionWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ClusterQueue
......
# frozen_string_literal: true
class ClusterUpgradeAppWorker
class ClusterUpgradeAppWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ClusterQueue
include ClusterApplications
......
# frozen_string_literal: true
class ClusterWaitForAppInstallationWorker
class ClusterWaitForAppInstallationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ClusterQueue
include ClusterApplications
......
# frozen_string_literal: true
class ClusterWaitForIngressIpAddressWorker
class ClusterWaitForIngressIpAddressWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ClusterQueue
include ClusterApplications
......
......@@ -2,7 +2,7 @@
module Clusters
module Applications
class ActivateServiceWorker
class ActivateServiceWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ClusterQueue
......
......@@ -2,7 +2,7 @@
module Clusters
module Applications
class DeactivateServiceWorker
class DeactivateServiceWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ClusterQueue
......
......@@ -2,7 +2,7 @@
module Clusters
module Applications
class UninstallWorker
class UninstallWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ClusterQueue
include ClusterApplications
......
......@@ -2,7 +2,7 @@
module Clusters
module Applications
class WaitForUninstallAppWorker
class WaitForUninstallAppWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ClusterQueue
include ClusterApplications
......
......@@ -2,7 +2,7 @@
module Clusters
module Cleanup
class AppWorker
class AppWorker # rubocop:disable Scalability/IdempotentWorker
include ClusterCleanupMethods
def perform(cluster_id, execution_count = 0)
......
......@@ -2,7 +2,7 @@
module Clusters
module Cleanup
class ProjectNamespaceWorker
class ProjectNamespaceWorker # rubocop:disable Scalability/IdempotentWorker
include ClusterCleanupMethods
def perform(cluster_id, execution_count = 0)
......
......@@ -2,7 +2,7 @@
module Clusters
module Cleanup
class ServiceAccountWorker
class ServiceAccountWorker # rubocop:disable Scalability/IdempotentWorker
include ClusterCleanupMethods
def perform(cluster_id)
......
......@@ -89,6 +89,14 @@ module WorkerAttributes
worker_attributes[:resource_boundary] || :unknown
end
def idempotent!
worker_attributes[:idempotent] = true
end
def idempotent?
worker_attributes[:idempotent]
end
def weight(value)
worker_attributes[:weight] = value
end
......
# frozen_string_literal: true
class ContainerExpirationPolicyWorker
class ContainerExpirationPolicyWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class CreateCommitSignatureWorker
class CreateCommitSignatureWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
# frozen_string_literal: true
class CreateEvidenceWorker
class CreateEvidenceWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :release_governance
......
# frozen_string_literal: true
class CreateNoteDiffFileWorker
class CreateNoteDiffFileWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
# frozen_string_literal: true
class CreatePipelineWorker
class CreatePipelineWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class DeleteContainerRepositoryWorker
class DeleteContainerRepositoryWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ExclusiveLeaseGuard
......
# frozen_string_literal: true
class DeleteDiffFilesWorker
class DeleteDiffFilesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
# frozen_string_literal: true
class DeleteMergedBranchesWorker
class DeleteMergedBranchesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
# frozen_string_literal: true
class DeleteStoredFilesWorker
class DeleteStoredFilesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category_not_owned!
......
# frozen_string_literal: true
class DeleteUserWorker
class DeleteUserWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :authentication_and_authorization
......
# frozen_string_literal: true
module Deployments
class FinishedWorker
class FinishedWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :deployment
......
# frozen_string_literal: true
module Deployments
class ForwardDeploymentWorker
class ForwardDeploymentWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :deployment
......
# frozen_string_literal: true
module Deployments
class SuccessWorker
class SuccessWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :deployment
......
# frozen_string_literal: true
class DetectRepositoryLanguagesWorker
class DetectRepositoryLanguagesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ExceptionBacktrace
include ExclusiveLeaseGuard
......
# frozen_string_literal: true
class EmailReceiverWorker
class EmailReceiverWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :issue_tracking
......
# frozen_string_literal: true
class EmailsOnPushWorker
class EmailsOnPushWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
attr_reader :email, :skip_premailer
......
# frozen_string_literal: true
module Environments
class AutoStopCronWorker
class AutoStopCronWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
......
......@@ -5,7 +5,7 @@
# If a link to a different GitLab issue exists, a new link
# will still be created, but will not be visible in Sentry
# until the prior link is deleted.
class ErrorTrackingIssueLinkWorker
class ErrorTrackingIssueLinkWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ExclusiveLeaseGuard
include Gitlab::Utils::StrongMemoize
......
# frozen_string_literal: true
class ExpireBuildArtifactsWorker
class ExpireBuildArtifactsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
......
# frozen_string_literal: true
class ExpireBuildInstanceArtifactsWorker
class ExpireBuildInstanceArtifactsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :continuous_integration
......
......@@ -6,6 +6,7 @@ class ExpireJobCacheWorker
queue_namespace :pipeline_cache
latency_sensitive_worker!
idempotent!
# rubocop: disable CodeReuse/ActiveRecord
def perform(job_id)
......
# frozen_string_literal: true
class ExpirePipelineCacheWorker
class ExpirePipelineCacheWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class FileHookWorker
class FileHookWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: false
......
# frozen_string_literal: true
class GitGarbageCollectWorker
class GitGarbageCollectWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: false
......
......@@ -6,7 +6,7 @@ module Gitlab
# number of jobs to complete, without blocking a thread. Once all jobs have
# been completed this worker will advance the import process to the next
# stage.
class AdvanceStageWorker
class AdvanceStageWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options dead: false
......
......@@ -2,7 +2,7 @@
module Gitlab
module GithubImport
class ImportDiffNoteWorker
class ImportDiffNoteWorker # rubocop:disable Scalability/IdempotentWorker
include ObjectImporter
def representation_class
......
......@@ -2,7 +2,7 @@
module Gitlab
module GithubImport
class ImportIssueWorker
class ImportIssueWorker # rubocop:disable Scalability/IdempotentWorker
include ObjectImporter
def representation_class
......
......@@ -2,7 +2,7 @@
module Gitlab
module GithubImport
class ImportLfsObjectWorker
class ImportLfsObjectWorker # rubocop:disable Scalability/IdempotentWorker
include ObjectImporter
def representation_class
......
......@@ -2,7 +2,7 @@
module Gitlab
module GithubImport
class ImportNoteWorker
class ImportNoteWorker # rubocop:disable Scalability/IdempotentWorker
include ObjectImporter
def representation_class
......
......@@ -2,7 +2,7 @@
module Gitlab
module GithubImport
class ImportPullRequestWorker
class ImportPullRequestWorker # rubocop:disable Scalability/IdempotentWorker
include ObjectImporter
def representation_class
......
......@@ -2,7 +2,7 @@
module Gitlab
module GithubImport
class RefreshImportJidWorker
class RefreshImportJidWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GithubImport::Queue
......
......@@ -3,7 +3,7 @@
module Gitlab
module GithubImport
module Stage
class FinishImportWorker
class FinishImportWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GithubImport::Queue
include StageMethods
......
......@@ -3,7 +3,7 @@
module Gitlab
module GithubImport
module Stage
class ImportBaseDataWorker
class ImportBaseDataWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GithubImport::Queue
include StageMethods
......
......@@ -3,7 +3,7 @@
module Gitlab
module GithubImport
module Stage
class ImportIssuesAndDiffNotesWorker
class ImportIssuesAndDiffNotesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GithubImport::Queue
include StageMethods
......
......@@ -3,7 +3,7 @@
module Gitlab
module GithubImport
module Stage
class ImportLfsObjectsWorker
class ImportLfsObjectsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GithubImport::Queue
include StageMethods
......
......@@ -3,7 +3,7 @@
module Gitlab
module GithubImport
module Stage
class ImportNotesWorker
class ImportNotesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GithubImport::Queue
include StageMethods
......
......@@ -3,7 +3,7 @@
module Gitlab
module GithubImport
module Stage
class ImportPullRequestsWorker
class ImportPullRequestsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GithubImport::Queue
include StageMethods
......
......@@ -3,7 +3,7 @@
module Gitlab
module GithubImport
module Stage
class ImportRepositoryWorker
class ImportRepositoryWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GithubImport::Queue
include StageMethods
......
......@@ -18,7 +18,7 @@
# - It marks the import as finished when all remaining jobs are done
module Gitlab
module PhabricatorImport
class BaseWorker
class BaseWorker # rubocop:disable Scalability/IdempotentWorker
include WorkerAttributes
include Gitlab::ExclusiveLeaseHelpers
......
# frozen_string_literal: true
module Gitlab
module PhabricatorImport
class ImportTasksWorker < BaseWorker
class ImportTasksWorker < BaseWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ProjectImportOptions # This marks the project as failed after too many tries
......
# frozen_string_literal: true
class GitlabShellWorker
class GitlabShellWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include Gitlab::ShellAdapter
......
# frozen_string_literal: true
class GitlabUsagePingWorker
class GitlabUsagePingWorker # rubocop:disable Scalability/IdempotentWorker
LEASE_TIMEOUT = 86400
include ApplicationWorker
......
# frozen_string_literal: true
class GroupDestroyWorker
class GroupDestroyWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ExceptionBacktrace
......
# frozen_string_literal: true
class GroupExportWorker
class GroupExportWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ExceptionBacktrace
......
# frozen_string_literal: true
class GroupImportWorker
class GroupImportWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ExceptionBacktrace
......
# frozen_string_literal: true
module HashedStorage
class BaseWorker
class BaseWorker # rubocop:disable Scalability/IdempotentWorker
include ExclusiveLeaseGuard
include WorkerAttributes
......
# frozen_string_literal: true
module HashedStorage
class MigratorWorker
class MigratorWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :hashed_storage
......
# frozen_string_literal: true
module HashedStorage
class ProjectMigrateWorker < BaseWorker
class ProjectMigrateWorker < BaseWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :hashed_storage
......
# frozen_string_literal: true
module HashedStorage
class ProjectRollbackWorker < BaseWorker
class ProjectRollbackWorker < BaseWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :hashed_storage
......
# frozen_string_literal: true
module HashedStorage
class RollbackerWorker
class RollbackerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :hashed_storage
......
# frozen_string_literal: true
class ImportExportProjectCleanupWorker
class ImportExportProjectCleanupWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
......
# frozen_string_literal: true
class ImportIssuesCsvWorker
class ImportIssuesCsvWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :issue_tracking
......
# frozen_string_literal: true
module IncidentManagement
class ProcessAlertWorker
class ProcessAlertWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :incident_management
......
# frozen_string_literal: true
class InvalidGpgSignatureUpdateWorker
class InvalidGpgSignatureUpdateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
......@@ -3,7 +3,7 @@
require 'json'
require 'socket'
class IrkerWorker
class IrkerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :integrations
......
# frozen_string_literal: true
class IssueDueSchedulerWorker
class IssueDueSchedulerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
......
# frozen_string_literal: true
module MailScheduler
class IssueDueWorker
class IssueDueWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include MailSchedulerQueue
......
......@@ -3,7 +3,7 @@
require 'active_job/arguments'
module MailScheduler
class NotificationServiceWorker
class NotificationServiceWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include MailSchedulerQueue
......
# frozen_string_literal: true
class MergeRequestMergeabilityCheckWorker
class MergeRequestMergeabilityCheckWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
# frozen_string_literal: true
class MergeWorker
class MergeWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
# frozen_string_literal: true
class MigrateExternalDiffsWorker
class MigrateExternalDiffsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
......@@ -6,7 +6,7 @@
# used to belong to. Projects in this state should be rare.
# The worker will reject doing anything for projects that *do* have a
# namespace. For those use ProjectDestroyWorker instead.
class NamespacelessProjectDestroyWorker
class NamespacelessProjectDestroyWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ExceptionBacktrace
......
# frozen_string_literal: true
module Namespaces
class PruneAggregationSchedulesWorker
class PruneAggregationSchedulesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
......
# frozen_string_literal: true
module Namespaces
class RootStatisticsWorker
class RootStatisticsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :update_namespace_statistics
......
# frozen_string_literal: true
module Namespaces
class ScheduleAggregationWorker
class ScheduleAggregationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :update_namespace_statistics
......
# frozen_string_literal: true
class NewIssueWorker
class NewIssueWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include NewIssuable
......
# frozen_string_literal: true
class NewMergeRequestWorker
class NewMergeRequestWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include NewIssuable
......
# frozen_string_literal: true
class NewNoteWorker
class NewNoteWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :issue_tracking
......
# frozen_string_literal: true
class NewReleaseWorker
class NewReleaseWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :notifications
......
# frozen_string_literal: true
module ObjectPool
class CreateWorker
class CreateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ObjectPoolQueue
include ExclusiveLeaseGuard
......
# frozen_string_literal: true
module ObjectPool
class DestroyWorker
class DestroyWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ObjectPoolQueue
......
# frozen_string_literal: true
module ObjectPool
class JoinWorker
class JoinWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ObjectPoolQueue
......
# frozen_string_literal: true
module ObjectPool
class ScheduleJoinWorker
class ScheduleJoinWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ObjectPoolQueue
......
# frozen_string_literal: true
module ObjectStorage
class BackgroundMoveWorker
class BackgroundMoveWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ObjectStorageQueue
......
# frozen_string_literal: true
# rubocop:disable Scalability/IdempotentWorker
module ObjectStorage
class MigrateUploadsWorker
include ApplicationWorker
......@@ -137,3 +138,4 @@ module ObjectStorage
end
end
end
# rubocop:enable Scalability/IdempotentWorker
# frozen_string_literal: true
class PagesDomainRemovalCronWorker
class PagesDomainRemovalCronWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class PagesDomainSslRenewalCronWorker
class PagesDomainSslRenewalCronWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class PagesDomainSslRenewalWorker
class PagesDomainSslRenewalWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :pages
......
# frozen_string_literal: true
class PagesDomainVerificationCronWorker
class PagesDomainVerificationCronWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class PagesDomainVerificationWorker
class PagesDomainVerificationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :pages
......
# frozen_string_literal: true
class PagesWorker
class PagesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
......
# frozen_string_literal: true
module PersonalAccessTokens
class ExpiringWorker
class ExpiringWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class PipelineHooksWorker
class PipelineHooksWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class PipelineMetricsWorker
class PipelineMetricsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class PipelineNotificationWorker
class PipelineNotificationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class PipelineProcessWorker
class PipelineProcessWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class PipelineScheduleWorker
class PipelineScheduleWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class PipelineSuccessWorker
class PipelineSuccessWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class PipelineUpdateWorker
class PipelineUpdateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class PostReceive
class PostReceive # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
......@@ -7,7 +7,7 @@
# result of this the workload of this worker should be kept to a bare minimum.
# Consider using an extra worker if you need to add any extra (and potentially
# slow) processing of commits.
class ProcessCommitWorker
class ProcessCommitWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
# frozen_string_literal: true
# Worker for updating any project specific caches.
class ProjectCacheWorker
class ProjectCacheWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
latency_sensitive_worker!
......
# frozen_string_literal: true
class ProjectDailyStatisticsWorker
class ProjectDailyStatisticsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
# frozen_string_literal: true
class ProjectDestroyWorker
class ProjectDestroyWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ExceptionBacktrace
......
# frozen_string_literal: true
class ProjectExportWorker
class ProjectExportWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ExceptionBacktrace
......
# frozen_string_literal: true
class ProjectServiceWorker
class ProjectServiceWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options dead: false
......
# frozen_string_literal: true
# Worker for updating any project specific caches.
class PropagateServiceTemplateWorker
class PropagateServiceTemplateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
# frozen_string_literal: true
class PruneOldEventsWorker
class PruneOldEventsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
......
......@@ -2,7 +2,7 @@
# Worker that deletes a fixed number of outdated rows from the "web_hook_logs"
# table.
class PruneWebHookLogsWorker
class PruneWebHookLogsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
......
# frozen_string_literal: true
class ReactiveCachingWorker
class ReactiveCachingWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category_not_owned!
......
......@@ -2,7 +2,7 @@
# The RebaseWorker must be wrapped in important concurrency code, so should only
# be scheduled via MergeRequest#rebase_async
class RebaseWorker
class RebaseWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
# frozen_string_literal: true
class RemoteMirrorNotificationWorker
class RemoteMirrorNotificationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
# frozen_string_literal: true
class RemoveExpiredGroupLinksWorker
class RemoveExpiredGroupLinksWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
......
# frozen_string_literal: true
class RemoveExpiredMembersWorker
class RemoveExpiredMembersWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
......
# frozen_string_literal: true
class RemoveUnreferencedLfsObjectsWorker
class RemoveUnreferencedLfsObjectsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
......
# frozen_string_literal: true
class RepositoryArchiveCacheWorker
class RepositoryArchiveCacheWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
......
# frozen_string_literal: true
module RepositoryCheck
class BatchWorker
class BatchWorker # rubocop:disable Scalability/IdempotentWorker
prepend_if_ee('::EE::RepositoryCheck::BatchWorker') # rubocop: disable Cop/InjectEnterpriseEditionModule
include ApplicationWorker
......
# frozen_string_literal: true
module RepositoryCheck
class ClearWorker
class ClearWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include RepositoryCheckQueue
......
# frozen_string_literal: true
module RepositoryCheck
class DispatchWorker
class DispatchWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
......
# frozen_string_literal: true
module RepositoryCheck
class SingleRepositoryWorker
class SingleRepositoryWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include RepositoryCheckQueue
......
# frozen_string_literal: true
class RepositoryCleanupWorker
class RepositoryCleanupWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
......
# frozen_string_literal: true
class RepositoryForkWorker
class RepositoryForkWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include Gitlab::ShellAdapter
include ProjectStartImport
......
# frozen_string_literal: true
class RepositoryImportWorker
class RepositoryImportWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ExceptionBacktrace
include ProjectStartImport
......
# frozen_string_literal: true
class RepositoryRemoveRemoteWorker
class RepositoryRemoveRemoteWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ExclusiveLeaseGuard
......
# frozen_string_literal: true
class RepositoryUpdateRemoteMirrorWorker
class RepositoryUpdateRemoteMirrorWorker # rubocop:disable Scalability/IdempotentWorker
UpdateError = Class.new(StandardError)
include ApplicationWorker
......
# frozen_string_literal: true
class RequestsProfilesWorker
class RequestsProfilesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
......
# frozen_string_literal: true
class RunPipelineScheduleWorker
class RunPipelineScheduleWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class ScheduleMigrateExternalDiffsWorker
class ScheduleMigrateExternalDiffsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext:
# This schedules the `MigrateExternalDiffsWorker`
......
# frozen_string_literal: true
class SelfMonitoringProjectCreateWorker
class SelfMonitoringProjectCreateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ExclusiveLeaseGuard
include SelfMonitoringProjectWorker
......
# frozen_string_literal: true
class SelfMonitoringProjectDeleteWorker
class SelfMonitoringProjectDeleteWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ExclusiveLeaseGuard
include SelfMonitoringProjectWorker
......
# frozen_string_literal: true
class StageUpdateWorker
class StageUpdateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class StuckCiJobsWorker
class StuckCiJobsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class StuckImportJobsWorker
class StuckImportJobsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker updates several import states inline and does not schedule
......
# frozen_string_literal: true
class StuckMergeJobsWorker
class StuckMergeJobsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
......
# frozen_string_literal: true
class SystemHookPushWorker
class SystemHookPushWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
# frozen_string_literal: true
module TodosDestroyer
class ConfidentialIssueWorker
class ConfidentialIssueWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include TodosDestroyerQueue
......
# frozen_string_literal: true
module TodosDestroyer
class EntityLeaveWorker
class EntityLeaveWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include TodosDestroyerQueue
......
# frozen_string_literal: true
module TodosDestroyer
class GroupPrivateWorker
class GroupPrivateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include TodosDestroyerQueue
......
# frozen_string_literal: true
module TodosDestroyer
class PrivateFeaturesWorker
class PrivateFeaturesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include TodosDestroyerQueue
......
# frozen_string_literal: true
module TodosDestroyer
class ProjectPrivateWorker
class ProjectPrivateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include TodosDestroyerQueue
......
# frozen_string_literal: true
class TrendingProjectsWorker
class TrendingProjectsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
......
# frozen_string_literal: true
class UpdateExternalPullRequestsWorker
class UpdateExternalPullRequestsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
# frozen_string_literal: true
class UpdateHeadPipelineForMergeRequestWorker
class UpdateHeadPipelineForMergeRequestWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class UpdateMergeRequestsWorker
class UpdateMergeRequestsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
# frozen_string_literal: true
# Worker for updating project statistics.
class UpdateProjectStatisticsWorker
class UpdateProjectStatisticsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
# frozen_string_literal: true
class UploadChecksumWorker
class UploadChecksumWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :geo_replication
......
# frozen_string_literal: true
class WaitForClusterCreationWorker
class WaitForClusterCreationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ClusterQueue
......
# frozen_string_literal: true
class WebHookWorker
class WebHookWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :integrations
......
# frozen_string_literal: true
class AdjournedGroupDeletionWorker
class AdjournedGroupDeletionWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class AdjournedProjectDeletionWorker
class AdjournedProjectDeletionWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ExceptionBacktrace
......
# frozen_string_literal: true
class AdjournedProjectsDeletionCronWorker
class AdjournedProjectsDeletionCronWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class AdminEmailsWorker
class AdminEmailsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :issue_tracking
......
......@@ -9,465 +9,543 @@
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:adjourned_projects_deletion_cron
:feature_category: :authentication_and_authorization
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:clear_shared_runners_minutes
:feature_category: :continuous_integration
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:geo_container_repository_sync_dispatch
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:geo_file_download_dispatch
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:geo_metrics_update
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:geo_migrated_local_files_clean_up
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:geo_prune_event_log
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:geo_repository_sync
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:geo_repository_verification_primary_batch
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:geo_repository_verification_secondary_scheduler
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:geo_repository_verification_secondary_shard
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:geo_scheduler_per_shard_scheduler
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:geo_scheduler_primary_per_shard_scheduler
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:geo_scheduler_secondary_per_shard_scheduler
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:geo_secondary_registry_consistency
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:geo_sidekiq_cron_config
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:historical_data
:feature_category: :license_compliance
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:import_software_licenses
:feature_category: :license_compliance
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:ldap_all_groups_sync
:feature_category: :authentication_and_authorization
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:ldap_sync
:feature_category: :authentication_and_authorization
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:pseudonymizer
:feature_category: :integrations
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:update_all_mirrors
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: cronjob:update_max_seats_used_for_gitlab_com_subscriptions
:feature_category: :license_compliance
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :cpu
:weight: 1
:idempotent:
- :name: epics:epics_update_epics_dates
:feature_category: :epics
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: gcp_cluster:cluster_update_app
:feature_category: :kubernetes_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: gcp_cluster:cluster_wait_for_app_update
:feature_category: :kubernetes_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_batch_project_registry
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_batch_project_registry_scheduler
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_container_repository_sync
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_design_repository_shard_sync
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_design_repository_sync
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_event
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_file_download
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_file_registry_removal
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_file_removal
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_hashed_storage_attachments_migration
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_hashed_storage_migration
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_project_sync
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_rename_repository
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_repositories_clean_up
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_repository_cleanup
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_repository_destroy
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_repository_shard_sync
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_repository_verification_primary_shard
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_repository_verification_primary_single
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_repository_verification_secondary_single
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_scheduler_primary_scheduler
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_scheduler_scheduler
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_scheduler_secondary_scheduler
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: geo:geo_secondary_repository_backfill
:feature_category: :geo_replication
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: incident_management:incident_management_process_prometheus_alert
:feature_category: :incident_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :cpu
:weight: 2
:idempotent:
- :name: jira_connect:jira_connect_sync_branch
:feature_category: :integrations
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: jira_connect:jira_connect_sync_merge_request
:feature_category: :integrations
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: package_repositories:packages_nuget_extraction
:feature_category: :package_registry
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: personal_access_tokens:personal_access_tokens_policy
:feature_category: :authentication_and_authorization
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: security_scans:store_security_reports
:feature_category: :static_application_security_testing
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: security_scans:store_security_scans
:feature_category: :static_application_security_testing
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: security_scans:sync_security_reports_to_report_approval_rules
:feature_category: :static_application_security_testing
:has_external_dependencies:
:latency_sensitive: true
:resource_boundary: :cpu
:weight: 2
:idempotent:
- :name: adjourned_project_deletion
:feature_category: :authentication_and_authorization
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: admin_emails
:feature_category: :issue_tracking
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: create_github_webhook
:feature_category: :integrations
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :cpu
:weight: 2
:idempotent:
- :name: design_management_new_version
:feature_category: :design_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: elastic_batch_project_indexer
:feature_category: :search
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: elastic_commit_indexer
:feature_category: :search
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: elastic_full_index
:feature_category: :search
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: elastic_indexer
:feature_category: :search
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: elastic_namespace_indexer
:feature_category: :search
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: elastic_namespace_rollout
:feature_category: :search
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: export_csv
:feature_category: :issue_tracking
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :memory
:weight: 1
:idempotent:
- :name: ldap_group_sync
:feature_category: :authentication_and_authorization
:has_external_dependencies: true
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: new_epic
:feature_category: :epics
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :cpu
:weight: 2
:idempotent:
- :name: project_import_schedule
:feature_category: :importers
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: project_update_repository_storage
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: refresh_license_compliance_checks
:feature_category: :license_compliance
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 2
:idempotent:
- :name: repository_push_audit_event
:feature_category: :authentication_and_authorization
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: repository_update_mirror
:feature_category: :source_code_management
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
- :name: service_desk_email_receiver
:feature_category: :issue_tracking
:has_external_dependencies:
:latency_sensitive:
:resource_boundary: :unknown
:weight: 1
:idempotent:
# frozen_string_literal: true
class ClearSharedRunnersMinutesWorker
class ClearSharedRunnersMinutesWorker # rubocop:disable Scalability/IdempotentWorker
LEASE_TIMEOUT = 3600
include ApplicationWorker
......
# frozen_string_literal: true
class ClusterUpdateAppWorker
class ClusterUpdateAppWorker # rubocop:disable Scalability/IdempotentWorker
UpdateAlreadyInProgressError = Class.new(StandardError)
include ApplicationWorker
......
# frozen_string_literal: true
class ClusterWaitForAppUpdateWorker
class ClusterWaitForAppUpdateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ClusterQueue
include ClusterApplications
......
# frozen_string_literal: true
class CreateGithubWebhookWorker
class CreateGithubWebhookWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GrapePathHelpers::NamedRouteMatcher
......
# frozen_string_literal: true
module DesignManagement
class NewVersionWorker
class NewVersionWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :design_management
......
# frozen_string_literal: true
class ElasticBatchProjectIndexerWorker
class ElasticBatchProjectIndexerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :search
......
# frozen_string_literal: true
class ElasticCommitIndexerWorker
class ElasticCommitIndexerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :search
......
......@@ -4,7 +4,7 @@
# indexing the repository, wiki and its nested models
# (e.g. )issues and notes etc.)
# Intended for full site indexing.
class ElasticFullIndexWorker
class ElasticFullIndexWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 2
......
# frozen_string_literal: true
class ElasticIndexerWorker
class ElasticIndexerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include Elasticsearch::Model::Client::ClassMethods
......
# frozen_string_literal: true
class ElasticNamespaceIndexerWorker
class ElasticNamespaceIndexerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :search
......
# frozen_string_literal: true
class ElasticNamespaceRolloutWorker
class ElasticNamespaceRolloutWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :search
......
# frozen_string_literal: true
module Epics
class UpdateEpicsDatesWorker
class UpdateEpicsDatesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :epics
......
# frozen_string_literal: true
class ExportCsvWorker
class ExportCsvWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :issue_tracking
......
......@@ -6,7 +6,7 @@ module Geo
#
# This class includes an Exclusive Lease guard and only one can be executed at the same time
# If multiple jobs are scheduled, only one will run and the others will drop forever.
class ProjectRegistrySchedulerWorker
class ProjectRegistrySchedulerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GeoQueue
include ExclusiveLeaseGuard
......
......@@ -6,7 +6,7 @@ module Geo
#
# This class includes an Exclusive Lease guard and only one can be executed at the same time
# If multiple jobs are scheduled, only one will run and the others will drop forever.
class ProjectRegistryWorker
class ProjectRegistryWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GeoQueue
include ::Gitlab::Geo::LogHelpers
......
# frozen_string_literal: true
module Geo
class ContainerRepositorySyncDispatchWorker < Geo::Scheduler::Secondary::SchedulerWorker
class ContainerRepositorySyncDispatchWorker < Geo::Scheduler::Secondary::SchedulerWorker # rubocop:disable Scalability/IdempotentWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
# frozen_string_literal: true
module Geo
class ContainerRepositorySyncWorker
class ContainerRepositorySyncWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GeoQueue
include Gitlab::Geo::LogHelpers
......
# frozen_string_literal: true
module Geo
class DesignRepositoryShardSyncWorker < RepositoryShardSyncWorker
class DesignRepositoryShardSyncWorker < RepositoryShardSyncWorker # rubocop:disable Scalability/IdempotentWorker
private
def schedule_job(project_id)
......
# frozen_string_literal: true
module Geo
class DesignRepositorySyncWorker
class DesignRepositorySyncWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GeoQueue
include Gitlab::Geo::LogHelpers
......
# frozen_string_literal: true
module Geo
class EventWorker
class EventWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GeoQueue
......
# frozen_string_literal: true
module Geo
class FileDownloadDispatchWorker < Geo::Scheduler::Secondary::SchedulerWorker
class FileDownloadDispatchWorker < Geo::Scheduler::Secondary::SchedulerWorker # rubocop:disable Scalability/IdempotentWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
# frozen_string_literal: true
module Geo
class FileDownloadDispatchWorker
class AttachmentJobFinder < JobFinder
class FileDownloadDispatchWorker # rubocop:disable Scalability/IdempotentWorker
class AttachmentJobFinder < JobFinder # rubocop:disable Scalability/IdempotentWorker
EXCEPT_RESOURCE_IDS_KEY = :except_file_ids
def registry_finder
......
# frozen_string_literal: true
module Geo
class FileDownloadDispatchWorker
class JobArtifactJobFinder < JobFinder
class FileDownloadDispatchWorker # rubocop:disable Scalability/IdempotentWorker
class JobArtifactJobFinder < JobFinder # rubocop:disable Scalability/IdempotentWorker
RESOURCE_ID_KEY = :artifact_id
EXCEPT_RESOURCE_IDS_KEY = :except_artifact_ids
FILE_SERVICE_OBJECT_TYPE = :job_artifact
......
# frozen_string_literal: true
module Geo
class FileDownloadDispatchWorker
class FileDownloadDispatchWorker # rubocop:disable Scalability/IdempotentWorker
# This class is meant to be inherited, and is responsible for generating
# batches of job arguments for FileDownloadWorker.
#
......@@ -12,7 +12,7 @@ module Geo
# * RESOURCE_ID_KEY
# * FILE_SERVICE_OBJECT_TYPE
#
class JobFinder
class JobFinder # rubocop:disable Scalability/IdempotentWorker
include Gitlab::Utils::StrongMemoize
attr_reader :scheduled_file_ids
......
# frozen_string_literal: true
module Geo
class FileDownloadDispatchWorker
class LfsObjectJobFinder < JobFinder
class FileDownloadDispatchWorker # rubocop:disable Scalability/IdempotentWorker
class LfsObjectJobFinder < JobFinder # rubocop:disable Scalability/IdempotentWorker
RESOURCE_ID_KEY = :lfs_object_id
EXCEPT_RESOURCE_IDS_KEY = :except_ids
FILE_SERVICE_OBJECT_TYPE = :lfs
......
# frozen_string_literal: true
module Geo
class FileDownloadWorker
class FileDownloadWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GeoQueue
......
# frozen_string_literal: true
module Geo
class FileRegistryRemovalWorker
class FileRegistryRemovalWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GeoQueue
include ::Gitlab::Geo::LogHelpers
......
# frozen_string_literal: true
module Geo
class FileRemovalWorker
class FileRemovalWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include Gitlab::Geo::LogHelpers
include GeoQueue
......
# frozen_string_literal: true
module Geo
class HashedStorageAttachmentsMigrationWorker
class HashedStorageAttachmentsMigrationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GeoQueue
......
# frozen_string_literal: true
module Geo
class HashedStorageMigrationWorker
class HashedStorageMigrationWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GeoQueue
......
# frozen_string_literal: true
module Geo
class MetricsUpdateWorker
class MetricsUpdateWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ExclusiveLeaseGuard
# rubocop:disable Scalability/CronWorkerContext
......
# frozen_string_literal: true
module Geo
class MigratedLocalFilesCleanUpWorker < ::Geo::Scheduler::Secondary::SchedulerWorker
class MigratedLocalFilesCleanUpWorker < ::Geo::Scheduler::Secondary::SchedulerWorker # rubocop:disable Scalability/IdempotentWorker
include ::CronjobQueue
MAX_CAPACITY = 1000
......
# frozen_string_literal: true
module Geo
class ProjectSyncWorker
class ProjectSyncWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GeoQueue
include Gitlab::Geo::LogHelpers
......
# frozen_string_literal: true
module Geo
class PruneEventLogWorker
class PruneEventLogWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
......
# frozen_string_literal: true
module Geo
class RenameRepositoryWorker
class RenameRepositoryWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GeoQueue
......
# frozen_string_literal: true
module Geo
class RepositoriesCleanUpWorker
class RepositoriesCleanUpWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include ExclusiveLeaseGuard
include GeoQueue
......
# frozen_string_literal: true
module Geo
class RepositoryCleanupWorker
class RepositoryCleanupWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GeoQueue
include ::Gitlab::Geo::LogHelpers
......
# frozen_string_literal: true
module Geo
class RepositoryShardSyncWorker < Geo::Scheduler::Secondary::SchedulerWorker
class RepositoryShardSyncWorker < Geo::Scheduler::Secondary::SchedulerWorker # rubocop:disable Scalability/IdempotentWorker
sidekiq_options retry: false
attr_accessor :shard_name
......
# frozen_string_literal: true
module Geo
class RepositorySyncWorker < Geo::Scheduler::Secondary::PerShardSchedulerWorker
class RepositorySyncWorker < Geo::Scheduler::Secondary::PerShardSchedulerWorker # rubocop:disable Scalability/IdempotentWorker
def schedule_job(shard_name)
if ::Feature.enabled?(:geo_streaming_results_repository_sync)
Geo::Secondary::RepositoryBackfillWorker.perform_async(shard_name)
......
......@@ -3,7 +3,7 @@
module Geo
module RepositoryVerification
module Primary
class BatchWorker < Geo::Scheduler::Primary::PerShardSchedulerWorker
class BatchWorker < Geo::Scheduler::Primary::PerShardSchedulerWorker # rubocop:disable Scalability/IdempotentWorker
def perform
return unless Gitlab::Geo.repository_verification_enabled?
......
......@@ -3,7 +3,7 @@
module Geo
module RepositoryVerification
module Primary
class ShardWorker < Geo::Scheduler::Primary::SchedulerWorker
class ShardWorker < Geo::Scheduler::Primary::SchedulerWorker # rubocop:disable Scalability/IdempotentWorker
sidekiq_options retry: false
attr_accessor :shard_name
......
......@@ -3,7 +3,7 @@
module Geo
module RepositoryVerification
module Primary
class SingleWorker
class SingleWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GeoQueue
include ExclusiveLeaseGuard
......
......@@ -3,7 +3,7 @@
module Geo
module RepositoryVerification
module Secondary
class SchedulerWorker < Geo::Scheduler::Secondary::PerShardSchedulerWorker
class SchedulerWorker < Geo::Scheduler::Secondary::PerShardSchedulerWorker # rubocop:disable Scalability/IdempotentWorker
def perform
return unless Gitlab::Geo.repository_verification_enabled?
......
......@@ -3,7 +3,7 @@
module Geo
module RepositoryVerification
module Secondary
class ShardWorker < Geo::Scheduler::Secondary::SchedulerWorker
class ShardWorker < Geo::Scheduler::Secondary::SchedulerWorker # rubocop:disable Scalability/IdempotentWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
......
......@@ -3,7 +3,7 @@
module Geo
module RepositoryVerification
module Secondary
class SingleWorker
class SingleWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GeoQueue
include ExclusiveLeaseGuard
......
......@@ -2,7 +2,7 @@
module Geo
module Scheduler
class PerShardSchedulerWorker
class PerShardSchedulerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
......
......@@ -3,7 +3,7 @@
module Geo
module Scheduler
module Primary
class PerShardSchedulerWorker < Geo::Scheduler::PerShardSchedulerWorker
class PerShardSchedulerWorker < Geo::Scheduler::PerShardSchedulerWorker # rubocop:disable Scalability/IdempotentWorker
def perform
unless Gitlab::Geo.primary?
log_info('Current node not a primary')
......
......@@ -3,7 +3,7 @@
module Geo
module Scheduler
module Primary
class SchedulerWorker < Geo::Scheduler::SchedulerWorker
class SchedulerWorker < Geo::Scheduler::SchedulerWorker # rubocop:disable Scalability/IdempotentWorker
def perform
return unless Gitlab::Geo.primary?
......
......@@ -2,7 +2,7 @@
module Geo
module Scheduler
class SchedulerWorker
class SchedulerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GeoQueue
include ExclusiveLeaseGuard
......
......@@ -3,7 +3,7 @@
module Geo
module Scheduler
module Secondary
class PerShardSchedulerWorker < Geo::Scheduler::PerShardSchedulerWorker
class PerShardSchedulerWorker < Geo::Scheduler::PerShardSchedulerWorker # rubocop:disable Scalability/IdempotentWorker
def perform
unless Gitlab::Geo.geo_database_configured?
log_info('Geo database not configured')
......
......@@ -3,7 +3,7 @@
module Geo
module Scheduler
module Secondary
class SchedulerWorker < Geo::Scheduler::SchedulerWorker
class SchedulerWorker < Geo::Scheduler::SchedulerWorker # rubocop:disable Scalability/IdempotentWorker
def perform
unless Gitlab::Geo.geo_database_configured?
log_info('Geo database not configured')
......
......@@ -5,7 +5,7 @@ module Geo
# Iterates over syncable records and creates the corresponding registry
# records which are missing. Then, the workers that actually schedule the
# sync work only have to query the registry table for never-synced records.
class RegistryConsistencyWorker
class RegistryConsistencyWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
prepend Reenqueuer
include ::Gitlab::Geo::LogHelpers
......
......@@ -2,7 +2,7 @@
module Geo
module Secondary
class RepositoryBackfillWorker
class RepositoryBackfillWorker # rubocop:disable Scalability/IdempotentWorker
include Geo::Secondary::BackfillWorker
private
......
# frozen_string_literal: true
module Geo
class SidekiqCronConfigWorker
class SidekiqCronConfigWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
......
# frozen_string_literal: true
class GeoRepositoryDestroyWorker
class GeoRepositoryDestroyWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GeoQueue
......
# frozen_string_literal: true
class HistoricalDataWorker
class HistoricalDataWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
......
# frozen_string_literal: true
class ImportSoftwareLicensesWorker
class ImportSoftwareLicensesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :cronjob
......
# frozen_string_literal: true
module IncidentManagement
class ProcessPrometheusAlertWorker
class ProcessPrometheusAlertWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :incident_management
......
# frozen_string_literal: true
module JiraConnect
class SyncBranchWorker
class SyncBranchWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :jira_connect
......
# frozen_string_literal: true
module JiraConnect
class SyncMergeRequestWorker
class SyncMergeRequestWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :jira_connect
......
# frozen_string_literal: true
class LdapAllGroupsSyncWorker
class LdapAllGroupsSyncWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
......
# frozen_string_literal: true
class LdapGroupSyncWorker
class LdapGroupSyncWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :authentication_and_authorization
......
# frozen_string_literal: true
class LdapSyncWorker
class LdapSyncWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
......
# frozen_string_literal: true
class NewEpicWorker
class NewEpicWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include NewIssuable
......
......@@ -2,7 +2,7 @@
module Packages
module Nuget
class ExtractionWorker
class ExtractionWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :package_repositories
......
# frozen_string_literal: true
module PersonalAccessTokens
class PolicyWorker
class PolicyWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
queue_namespace :personal_access_tokens
......
# frozen_string_literal: true
class ProjectImportScheduleWorker
class ProjectImportScheduleWorker # rubocop:disable Scalability/IdempotentWorker
ImportStateNotFound = Class.new(StandardError)
include ApplicationWorker
......
# frozen_string_literal: true
class ProjectUpdateRepositoryStorageWorker
class ProjectUpdateRepositoryStorageWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :source_code_management
......
# frozen_string_literal: true
class PseudonymizerWorker
class PseudonymizerWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
......
# frozen_string_literal: true
class RefreshLicenseComplianceChecksWorker
class RefreshLicenseComplianceChecksWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :license_compliance
......
# frozen_string_literal: true
class RepositoryPushAuditEventWorker
class RepositoryPushAuditEventWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
feature_category :authentication_and_authorization
......
# frozen_string_literal: true
class RepositoryUpdateMirrorWorker
class RepositoryUpdateMirrorWorker # rubocop:disable Scalability/IdempotentWorker
UpdateError = Class.new(StandardError)
include ApplicationWorker
......
# frozen_string_literal: true
class ServiceDeskEmailReceiverWorker < EmailReceiverWorker
class ServiceDeskEmailReceiverWorker < EmailReceiverWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
def perform(raw)
......
......@@ -2,7 +2,7 @@
# Worker for storing security reports into the database.
#
class StoreSecurityReportsWorker
class StoreSecurityReportsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include SecurityScansQueue
......
# frozen_string_literal: true
class StoreSecurityScansWorker
class StoreSecurityScansWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include SecurityScansQueue
......
......@@ -2,7 +2,7 @@
# Worker for syncing report_type approval_rules approvals_required
#
class SyncSecurityReportsToReportApprovalRulesWorker
class SyncSecurityReportsToReportApprovalRulesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include SecurityScansQueue
......
# frozen_string_literal: true
class UpdateAllMirrorsWorker
class UpdateAllMirrorsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class UpdateMaxSeatsUsedForGitlabComSubscriptionsWorker
class UpdateMaxSeatsUsedForGitlabComSubscriptionsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
......
......@@ -11,6 +11,7 @@ module Gitlab
has_external_dependencies: :worker_has_external_dependencies?,
latency_sensitive: :latency_sensitive_worker?,
resource_boundary: :get_worker_resource_boundary,
idempotent: :idempotent?,
weight: :get_weight
}.freeze
......
......@@ -7,7 +7,7 @@ module Gitlab
attr_reader :klass
delegate :feature_category_not_owned?, :get_feature_category,
:get_weight, :get_worker_resource_boundary,
:get_weight, :get_worker_resource_boundary, :idempotent?,
:latency_sensitive_worker?, :queue, :queue_namespace,
:worker_has_external_dependencies?,
to: :klass
......@@ -51,7 +51,8 @@ module Gitlab
has_external_dependencies: worker_has_external_dependencies?,
latency_sensitive: latency_sensitive_worker?,
resource_boundary: get_worker_resource_boundary,
weight: get_weight
weight: get_weight,
idempotent: idempotent?
}
end
......
# frozen_string_literal: true
require_relative '../../code_reuse_helpers.rb'
module RuboCop
module Cop
module Scalability
# This cop checks for the `idempotent!` call in the worker scope.
#
# @example
#
# # bad
# class TroubleMakerWorker
# def perform
# end
# end
#
# # good
# class NiceWorker
# idempotent!
#
# def perform
# end
# end
#
class IdempotentWorker < RuboCop::Cop::Cop
include CodeReuseHelpers
HELP_LINK = 'https://github.com/mperham/sidekiq/wiki/Best-Practices#2-make-your-job-idempotent-and-transactional'
MSG = <<~MSG
Avoid adding not idempotent workers.
A worker is considered idempotent if:
1. It can safely run multiple times with the same arguments
2. The application side-effects are expected to happen once (or side-effects of a second run are not impactful)
3. It can safely be skipped if another job with the same arguments is already in the queue
If all the above is true, make sure to mark it as so by calling the `idempotent!`
method in the worker scope.
See #{HELP_LINK}
MSG
def_node_search :idempotent?, <<~PATTERN
(send nil? :idempotent!)
PATTERN
def on_class(node)
return unless in_worker?(node)
return if idempotent?(node)
add_offense(node, location: :expression)
end
end
end
end
end
......@@ -12,7 +12,8 @@ describe Gitlab::SidekiqConfig::Worker do
get_weight: attributes[:weight],
get_worker_resource_boundary: attributes[:resource_boundary],
latency_sensitive_worker?: attributes[:latency_sensitive],
worker_has_external_dependencies?: attributes[:has_external_dependencies]
worker_has_external_dependencies?: attributes[:has_external_dependencies],
idempotent?: attributes[:idempotent]
)
described_class.new(inner_worker, ee: false)
......@@ -89,7 +90,8 @@ describe Gitlab::SidekiqConfig::Worker do
has_external_dependencies: false,
latency_sensitive: false,
resource_boundary: :memory,
weight: 2
weight: 2,
idempotent: true
}
attributes_b = {
......@@ -97,7 +99,8 @@ describe Gitlab::SidekiqConfig::Worker do
has_external_dependencies: true,
latency_sensitive: true,
resource_boundary: :unknown,
weight: 1
weight: 3,
idempotent: false
}
worker_a = create_worker(queue: 'a', **attributes_a)
......
# frozen_string_literal: true
require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../support/helpers/expect_offense'
require_relative '../../../../rubocop/cop/scalability/idempotent_worker'
describe RuboCop::Cop::Scalability::IdempotentWorker do
include CopHelper
include ExpectOffense
subject(:cop) { described_class.new }
before do
allow(cop)
.to receive(:in_worker?)
.and_return(true)
end
it 'adds an offense when not defining idempotent method' do
inspect_source(<<~CODE.strip_indent)
class SomeWorker
end
CODE
expect(cop.offenses.size).to eq(1)
end
it 'adds an offense when not defining idempotent method' do
inspect_source(<<~CODE.strip_indent)
class SomeWorker
idempotent!
end
CODE
expect(cop.offenses.size).to be_zero
end
end
......@@ -119,6 +119,7 @@ RSpec.configure do |config|
config.include PolicyHelpers, type: :policy
config.include MemoryUsageHelper
config.include ExpectRequestWithStatus, type: :request
config.include IdempotentWorkerHelper, type: :worker
config.include RailsHelpers
if ENV['CI'] || ENV['RETRIES']
......
# frozen_string_literal: true
module IdempotentWorkerHelper
WORKER_EXEC_TIMES = 2
def perform_multiple(args = [], worker: described_class.new, exec_times: WORKER_EXEC_TIMES)
Sidekiq::Testing.inline! do
job_args = args.nil? ? [nil] : Array.wrap(args)
expect(worker).to receive(:perform).exactly(exec_times).and_call_original
exec_times.times { worker.perform(*job_args) }
end
end
end
# frozen_string_literal: true
# This shared_example requires the following variables:
# - job_args (if not given, will fallback to call perform without arguments)
#
# Usage:
#
# include_examples 'an idempotent worker' do
# it 'checks the side-effects for multiple calls' do
# # it'll call the job's perform method 3 times
# # by default.
# subject
#
# expect(model.state).to eq('state')
# end
# end
#
RSpec.shared_examples 'an idempotent worker' do
# Avoid stubbing calls for a more accurate run.
subject do
defined?(job_args) ? perform_multiple(job_args) : perform_multiple
end
it 'is labeled as idempotent' do
expect(described_class).to be_idempotent
end
it 'performs multiple times sequentially without raising an exception' do
expect { subject }.not_to raise_error
end
end
......@@ -6,20 +6,32 @@ describe ExpireJobCacheWorker do
set(:pipeline) { create(:ci_empty_pipeline) }
let(:project) { pipeline.project }
subject { described_class.new }
describe '#perform' do
context 'with a job in the pipeline' do
let(:job) { create(:ci_build, pipeline: pipeline) }
let(:job_args) { job.id }
include_examples 'an idempotent worker' do
it 'invalidates Etag caching for the job path' do
pipeline_path = "/#{project.full_path}/pipelines/#{pipeline.id}.json"
job_path = "/#{project.full_path}/builds/#{job.id}.json"
spy_store = Gitlab::EtagCaching::Store.new
allow(Gitlab::EtagCaching::Store).to receive(:new) { spy_store }
it 'invalidates Etag caching for the job path' do
pipeline_path = "/#{project.full_path}/pipelines/#{pipeline.id}.json"
job_path = "/#{project.full_path}/builds/#{job.id}.json"
expect(spy_store).to receive(:touch)
.exactly(IdempotentWorkerHelper::WORKER_EXEC_TIMES).times
.with(pipeline_path)
.and_call_original
expect_any_instance_of(Gitlab::EtagCaching::Store).to receive(:touch).with(pipeline_path)
expect_any_instance_of(Gitlab::EtagCaching::Store).to receive(:touch).with(job_path)
expect(spy_store).to receive(:touch)
.exactly(IdempotentWorkerHelper::WORKER_EXEC_TIMES).times
.with(job_path)
.and_call_original
subject.perform(job.id)
subject
end
end
end
......@@ -27,7 +39,7 @@ describe ExpireJobCacheWorker do
it 'does not change the etag store' do
expect(Gitlab::EtagCaching::Store).not_to receive(:new)
subject.perform(9999)
perform_multiple(9999)
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment