Merge pull request #9194 from demarches-simplifiees/fix-replay-routing-engine
Correction : rejoue le routing engine apres ajout des règles de routage sur une procédure clonée
This commit is contained in:
commit
92bdab3de4
1 changed files with 25 additions and 0 deletions
|
@ -0,0 +1,25 @@
|
|||
namespace :after_party do
|
||||
desc 'Deployment task: replay_routing_engine_for_a_cloned_procedure'
|
||||
task replay_routing_engine_for_a_cloned_procedure: :environment do
|
||||
puts "Running deploy task 'replay_routing_engine_for_a_cloned_procedure'"
|
||||
|
||||
# Put your task implementation HERE.
|
||||
dossiers = Procedure
|
||||
.find(76266)
|
||||
.dossiers
|
||||
.en_construction
|
||||
|
||||
progress = ProgressReport.new(dossiers.count)
|
||||
|
||||
dossiers.find_each do |dossier|
|
||||
RoutingEngine.compute(dossier)
|
||||
progress.inc
|
||||
end
|
||||
progress.finish
|
||||
|
||||
# Update task as completed. If you remove the line below, the task will
|
||||
# run with every deploy (or every time you call after_party:run).
|
||||
AfterParty::TaskRecord
|
||||
.create version: AfterParty::TaskRecorder.new(__FILE__).timestamp
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue