CV2-6172: Prevent duplicate Sidekiq jobs#2435
Conversation
| @@ -15,7 +15,6 @@ def perform(model_data, options, type) | |||
| ops = { | |||
| 'create_doc' => 'create_elasticsearch_doc_bg', | |||
| 'update_doc' => 'update_elasticsearch_doc_bg', | |||
| 'update_doc_team' => 'update_elasticsearch_doc_team_bg', | |||
There was a problem hiding this comment.
I found that this callback has already been removed from the code, so there's no need to include it in the list.
caiosba
left a comment
There was a problem hiding this comment.
Approving, assuming this only applies when all fields are updated, not just a single field, right? That’s how I understood it. Otherwise, it could miss some field updates and only apply the latest ones. Please confirm, @melsawy.
This applies when single or some fields update but the model not ProjectMedia |
6b081f1 to
d407090
Compare
Description
Added a new argument to ElasticSearchWorker
enqueued_atso I can skip job execution if the job is outdated.References: CV2-6172
How to test?
Added unit test
Checklist