diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /doc/development/sidekiq | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'doc/development/sidekiq')
-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 |