diff options
Diffstat (limited to 'app/workers/project_destroy_worker.rb')
-rw-r--r-- | app/workers/project_destroy_worker.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/workers/project_destroy_worker.rb b/app/workers/project_destroy_worker.rb index 45d0ebd2b65..181eebe56e8 100644 --- a/app/workers/project_destroy_worker.rb +++ b/app/workers/project_destroy_worker.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class ProjectDestroyWorker # rubocop:disable Scalability/IdempotentWorker +class ProjectDestroyWorker include ApplicationWorker data_consistency :always @@ -10,6 +10,9 @@ class ProjectDestroyWorker # rubocop:disable Scalability/IdempotentWorker feature_category :source_code_management + idempotent! + deduplicate :until_executed, ttl: 2.hours + def perform(project_id, user_id, params) project = Project.find(project_id) user = User.find(user_id) |