Skip to content

Instantly share code, notes, and snippets.

@bcg
Created May 14, 2012 21:20
Show Gist options
  • Save bcg/2697205 to your computer and use it in GitHub Desktop.
Save bcg/2697205 to your computer and use it in GitHub Desktop.
tasklist = 'aof-stuff'
task = 'cp-aofs'
if hostname ~= /serf/
SWFJob.wait_on(tasklist,task) do |result|
if system('cp this to/that')
result = SWFJob.SUCCESS
else
result = SWFJob.FAIL
end
end
elsif hostname ~= /randomtask/
SWFJob.wait_on(tasklist,task) do |result|
if system('cp this to/that')
result = SWFJob.SUCCESS
else
result = SWFJob.FAIL
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment