lib/decidim/cdtb/task.rb in decidim-cdtb-0.1.2 vs lib/decidim/cdtb/task.rb in decidim-cdtb-0.1.3
- old
+ new
@@ -20,24 +20,24 @@
attr_reader :num_applied, :title
def init
log_task_title(@title)
@start_time= Time.zone.now
- do_log("▶️ Starting at #{@start_time}")
+ do_log_info("▶️ Starting at #{@start_time}")
end
def execute!
init
ctx= {}
- ctx[:progress_bar]= ProgressBar.create(total: total_items, title: title) if has_progress?
prepare_execution(ctx)
+ ctx[:progress_bar]= ProgressBar.create(total: total_items, title: title) if has_progress?
do_execution(ctx)
end_execution(ctx)
finish
end
def finish
- do_log("⏱️ Took #{Time.zone.now - @start_time} seconds")
+ do_log_info("⏱️ Took #{Time.zone.now - @start_time} seconds")
log_task_end
end
#################################