change the way we set the finished_at on batch operation job to fix alert display bug
This commit is contained in:
parent
b93b8a7230
commit
d0a131dc55
5 changed files with 39 additions and 26 deletions
|
@ -95,7 +95,6 @@ class BatchOperation < ApplicationRecord
|
|||
def track_processed_dossier(success, dossier)
|
||||
dossiers.delete(dossier)
|
||||
touch(:run_at) if called_for_first_time?
|
||||
touch(:finished_at) if called_for_last_time?(dossier)
|
||||
|
||||
if success
|
||||
dossier_operation(dossier).done!
|
||||
|
@ -124,10 +123,6 @@ class BatchOperation < ApplicationRecord
|
|||
run_at.nil?
|
||||
end
|
||||
|
||||
def called_for_last_time?(dossier_to_ignore)
|
||||
dossiers.count.zero?
|
||||
end
|
||||
|
||||
def total_count
|
||||
dossier_operations.size
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue