tasks: add a description to make :pieces_justificatives tasks valid
This commit is contained in:
parent
a65774b726
commit
c7f2113972
1 changed files with 6 additions and 0 deletions
|
@ -1,6 +1,9 @@
|
|||
require Rails.root.join("lib", "tasks", "task_helper")
|
||||
|
||||
namespace :pieces_justificatives do
|
||||
desc <<~EOD
|
||||
Migrate the PJ to champs for a single PROCEDURE_ID.
|
||||
EOD
|
||||
task migrate_procedure_to_champs: :environment do
|
||||
procedure_id = ENV['PROCEDURE_ID']
|
||||
procedure = Procedure.find(procedure_id)
|
||||
|
@ -17,6 +20,9 @@ namespace :pieces_justificatives do
|
|||
progress.finish
|
||||
end
|
||||
|
||||
desc <<~EOD
|
||||
Migrate the PJ to champs for several procedures ids, from RANGE_START to RANGE_END.
|
||||
EOD
|
||||
task migrate_procedures_range_to_champs: :environment do
|
||||
if ENV['RANGE_START'].nil? || ENV['RANGE_END'].nil?
|
||||
fail "RANGE_START and RANGE_END must be specified"
|
||||
|
|
Loading…
Reference in a new issue