diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-10 00:07:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-10 00:07:17 +0300 |
commit | 94a2edbe7984384df4c3fb7efa308af2e0f42d8c (patch) | |
tree | 96b563670ef5d790a4e97f8d153dc667d971ef64 /doc/development/sidekiq/compatibility_across_updates.md | |
parent | 7d8fc3b6b67a22969cd1fa5cb018fc22e6aa1ade (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/sidekiq/compatibility_across_updates.md')
-rw-r--r-- | doc/development/sidekiq/compatibility_across_updates.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/development/sidekiq/compatibility_across_updates.md b/doc/development/sidekiq/compatibility_across_updates.md index e61e1420717..c9759a1c95f 100644 --- a/doc/development/sidekiq/compatibility_across_updates.md +++ b/doc/development/sidekiq/compatibility_across_updates.md @@ -131,12 +131,12 @@ To remove a worker class, follow these steps over two minor releases: 1. Remove any code that enqueues the jobs. - For example, if there is a UI component or an API endpoint that a user can interact with that results in the worker instance getting enqueued, make sure those surface areas are either removed or updated in a way that the worker instance is no longer enqueued. + For example, if there is a UI component or an API endpoint that a user can interact with that results in the worker instance getting enqueued, make sure those surface areas are either removed or updated in a way that the worker instance is no longer enqueued. This ensures that instances related to the worker class are no longer being enqueued. 1. Ensure both the frontend and backend code no longer relies on any of the work that used to be done by the worker. -1. In the relevant worker classes, replace the contents of the `perform` method with a no-op, while keeping any arguments in tact. +1. In the relevant worker classes, replace the contents of the `perform` method with a no-op, while keeping any arguments in tact. For example, if you're working with the following `ExampleWorker`: @@ -147,7 +147,7 @@ To remove a worker class, follow these steps over two minor releases: end end ``` - + Implementing the no-op might look like this: ```ruby @@ -190,7 +190,7 @@ When renaming queues, use the `sidekiq_queue_migrate` helper migration method in a **post-deployment migration**: ```ruby -class MigrateTheRenamedSidekiqQueue < Gitlab::Database::Migration[2.0] +class MigrateTheRenamedSidekiqQueue < Gitlab::Database::Migration[2.1] restrict_gitlab_migration gitlab_schema: :gitlab_main disable_ddl_transaction! |