From 2d6fa24975ac5a3d28e657a96a781db1cb17d56c Mon Sep 17 00:00:00 2001 From: Xinhui Date: Tue, 27 Sep 2016 15:49:04 +0200 Subject: Refactoring rake codifligne:sync Refs #1707 --- app/workers/line_referential_sync_worker.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/workers') diff --git a/app/workers/line_referential_sync_worker.rb b/app/workers/line_referential_sync_worker.rb index e63bf97cc..b39fae5e5 100644 --- a/app/workers/line_referential_sync_worker.rb +++ b/app/workers/line_referential_sync_worker.rb @@ -1,6 +1,5 @@ class LineReferentialSyncWorker include Sidekiq::Worker - sidekiq_options :retry => false def update_started_at lref_sync lref_sync.update_attribute(:started_at, Time.now) @@ -11,13 +10,16 @@ class LineReferentialSyncWorker end def perform(lref_sync_id) + logger.info "worker call to perfom" lref_sync = LineReferentialSync.find lref_sync_id update_started_at lref_sync begin Stif::CodifLineSynchronization.synchronize + logger.info "worker done CodifLineSynchronization" rescue Exception => e ap "LineReferentialSyncWorker perform:rescue #{e.message}" ensure + logger.info "worker ensure ended_at" update_ended_at lref_sync end end -- cgit v1.2.3