aboutsummaryrefslogtreecommitdiffstats
path: root/app/workers
diff options
context:
space:
mode:
authorXinhui2016-09-27 15:49:04 +0200
committerXinhui2016-09-27 16:01:47 +0200
commit2d6fa24975ac5a3d28e657a96a781db1cb17d56c (patch)
tree66101505db30cd3100fbba63bf13d4cbcf4f4990 /app/workers
parent12f506a82ae9099cface5b9507dd8a36bf923508 (diff)
downloadchouette-core-2d6fa24975ac5a3d28e657a96a781db1cb17d56c.tar.bz2
Refactoring rake codifligne:sync
Refs #1707
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/line_referential_sync_worker.rb4
1 files changed, 3 insertions, 1 deletions
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