Skip to content

Instantly share code, notes, and snippets.

@Stephenitis
Created November 14, 2013 22:52
Show Gist options
  • Save Stephenitis/7475759 to your computer and use it in GitHub Desktop.
Save Stephenitis/7475759 to your computer and use it in GitHub Desktop.
iced@iced test % cat test.worker
exec 'test.rb'
iced@iced test % cat test.rb
puts config.inspect
puts "YO!"
iced@iced test % iron_worker upload test --worker-config test.json
------> Creating client
Project 'Test' with id='517baf16ed3d7607990013a0'
------> Creating code package
Found workerfile with path='test.worker'
Detected exec with path='test.rb' and args='{}'
Code package name is 'test'
Loading worker_config at test.json
------> Uploading code package 'test'
Code package uploaded with id='517baf420865524a8c029835' and revision='9'
Check 'https://hud.iron.io/tq/projects/517baf16ed3d7607990013a0/code/517baf420865524a8c029835' for more info
iced@iced test % iron_worker queue test --wait
------> Creating client
Project 'Test' with id='517baf16ed3d7607990013a0'
------> Queueing task
Code package 'test' queued with id='517bb344ca2a05669004ff1b'
Check 'https://hud.iron.io/tq/projects/517baf16ed3d7607990013a0/jobs/517bb344ca2a05669004ff1b' for more info
------> Getting log for task with id='517bb344ca2a05669004ff1b'
{"foo"=>"bar"}
YO!
iced@iced test % vim test.rb
iced@iced test % git diff test.rb >test.patch
iced@iced test % cat test.patch
diff --git a/test.rb b/test.rb
index db70503..2430973 100644
--- a/test.rb
+++ b/test.rb
@@ -1,2 +1,2 @@
puts config.inspect
-puts "YO!"
+puts "WAZZAP!"
iced@iced test % iron_worker patch test -p test.patch
------> Creating client
Project 'Test' with id='517baf16ed3d7607990013a0'
------> Patching code package 'test'
Detected exec with path='/tmp/iron-worker-ng-20130427-18701-mq97lu-exec/patchcer.rb' and args='{}'
Merging file with path='test.patch' and dest='patch'
Patched code package uploaded with id='517baf420865524a8c029835' and revision='10'
Check 'https://hud.iron.io/tq/projects/517baf16ed3d7607990013a0/code/517baf420865524a8c029835' for more info
iced@iced test % iron_worker queue test --wait
------> Creating client
Project 'Test' with id='517baf16ed3d7607990013a0'
------> Queueing task
Code package 'test' queued with id='517bb372ca2a05669004ff49'
Check 'https://hud.iron.io/tq/projects/517baf16ed3d7607990013a0/jobs/517bb372ca2a05669004ff49' for more info
------> Getting log for task with id='517bb372ca2a05669004ff49'
{"foo"=>"bar"}
WAZZAP!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment