Select Git revision
An error occurred while fetching branches. Retry the search.
build_success_worker.rb
Forked from
GitLab.org / GitLab
Source project has a limited visibility.
-
Oswaldo Ferreir authored
This commit's goal is to add a cop (Scalability::IdempotentWorker) that will catch all workers that don't call idempotent! in its scope. Calling it will label the worker as idempotent, which will end up in our Sidekiq logs for further visibility. This also introduces a shared example and a perform_multiple helper method for executing jobs multiple times through unit tests. Also in this commit we set an example in an already idempotent worker ExpireJobCacheWorker. For this worker we call idempotent! in its scope and add tests with the new test helpers.
Oswaldo Ferreir authoredThis commit's goal is to add a cop (Scalability::IdempotentWorker) that will catch all workers that don't call idempotent! in its scope. Calling it will label the worker as idempotent, which will end up in our Sidekiq logs for further visibility. This also introduces a shared example and a perform_multiple helper method for executing jobs multiple times through unit tests. Also in this commit we set an example in an already idempotent worker ExpireJobCacheWorker. For this worker we call idempotent! in its scope and add tests with the new test helpers.