diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-17 18:07:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-17 18:07:22 +0300 |
commit | d41edc2e93480db35e48ad770ebe95075fbca871 (patch) | |
tree | 09d4f5cd1575babf508c73a2653f68b35cd1e936 /doc/development/sidekiq/index.md | |
parent | b17a559378235d37f5168d8d18818043cdaaf90b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/sidekiq/index.md')
-rw-r--r-- | doc/development/sidekiq/index.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/development/sidekiq/index.md b/doc/development/sidekiq/index.md index c9d783377bd..f4f98641d39 100644 --- a/doc/development/sidekiq/index.md +++ b/doc/development/sidekiq/index.md @@ -83,6 +83,19 @@ Each retry for a worker is counted as a failure in our metrics. A worker which always fails 9 times and succeeds on the 10th would have a 90% error rate. +If you want to manually retry the worker without tracking the exception in Sentry, +use an exception class inherited from `Gitlab::SidekiqMiddleware::RetryError`. + +```ruby +ServiceUnavailable = Class.new(::Gitlab::SidekiqMiddleware::RetryError) + +def perform + ... + + raise ServiceUnavailable if external_service_unavailable? +end +``` + ## Sidekiq Queues Previously, each worker had its own queue, which was automatically set based on the |