Permalink
Browse files

added ftp.last.data timestamp to track last timestamp data was transf…

…erred in FTP syncer
  • Loading branch information...
1 parent 035c7a2 commit 986c7e808314feed307f23a43098bc11cebb3567 Dhruv Bansal committed Jan 28, 2014
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/wukong-deploy/extensions/ftp_syncer.rb
@@ -20,7 +20,10 @@ def after_sync
step: 'ftp',
files: self.files,
}.tap { |e| e[:duration] = duration if duration })
- Wukong::Deploy.vayacondios_client.set!(vayacondios_topic, "ftp.last", { state: 1, time: Time.now.utc.to_i })
+ now = Time.now.utc.to_i
+ last_ftp_sync_summary = { state: 1, time: now}
+ last_ftp_sync_summary[:data] = now unless self.files.empty?
+ Wukong::Deploy.vayacondios_client.set!(vayacondios_topic, "ftp.last", last_ftp_sync_summary)
end
# Announces an error during a sync and updates the last sync

0 comments on commit 986c7e8

Please sign in to comment.