You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classRemoteFileTask < FileTask# pseudo codedefneeded?
! File.exist_on_every_remote_host?(name) || out_of_date?(timestamp) || @application.options.build_allend# Time stamp for file task.deftimestampifFile.exist_remote_on_all_roles?(name)sanatize_time(File.earliest_mtime_remote(name.to_s))elseRake::EARLYendenddefsanatize_time(time)ifoption_trust_timetimeelseget_earliest_time_on_remote_hosts_diff_to_local_time(time)endendprivate# has to be changeddefout_of_date?(stamp)@prerequisites.any?{ |n| application[n,@scope].timestamp > stamp}endend
The text was updated successfully, but these errors were encountered:
And I don't believe that your suggestions (get_earliest_time_on_remote_hosts_diff_to_local_time) will really work, but I would love them to.
Can you please explain your concerns?
Do you think a time_diff_host_1 = 'ssh date -u' - Time.local.utc , time_diff_host_2 = 'ssh date -u' - Time.local.utc and so on is not sufficient? The drifft should be max 1 second I think. And when some one does not want to setup a time server to sync time then this approach should be ok. If the user has a timeserver and sets the options we trust the remote time and caluclate no diff.
After the file creation you have to touch the files on all servers and set the same timestamp.
I like to suggest to Introduce first a RoleTask. With this in place you can do this (only a thought not tested):
And with a RemoteFileTask
The text was updated successfully, but these errors were encountered: