Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed example enqueue

  • Loading branch information...
commit 82624ae08230b14fa32c3fa5de10e289735442d3 1 parent 28bd7d6
@treeder treeder authored
Showing with 28 additions and 17 deletions.
  1. +2 −0  .gitignore
  2. +5 −1 README.md
  3. +21 −0 enqueue.rb
  4. +0 −16 queue.rb
View
2  .gitignore
@@ -1,3 +1,5 @@
.idea/
*.sublime*
pkg/
+iron.json
+enqueue_private.rb
View
6 README.md
@@ -11,16 +11,20 @@ First of all, the code to test must be able to check for a special config variab
if defined? $abt_config
@config = $abt_config
end
+
A real world example of using $abt_config is here: https://github.com/iron-io/iron_mq_ruby/blob/master/test/test_base.rb
### Upload worker
iron_worker upload https://github.com/iron-io/abt/blob/master/abt.worker
- Or (if you want to customize smth)
+
+Or (if you want to customize smth)
git clone https://github.com/iron-io/abt.git
iron_worker upload abt
+
### Get it running
+
Using CLI
iron_worker queue abt -p "{\"git_url\":\"git://github.com/iron-io/iron_mq_ruby.git\",\"test_config\":{}}"
View
21 enqueue.rb
@@ -0,0 +1,21 @@
+require 'iron_worker_ng'
+client = IronWorkerNG::Client.new
+
+params = {
+ "git_url" => 'git://github.com/iron-io/iron_mq_ruby.git',
+ "test_config" => {"iron" =>
+ {"project_id" => "YOUR_PROJECT_ID",
+ "token" => "YOUR_TOKEN"}
+ },
+ "notifiers" => [
+ {"class_name" => "HipChatNotifier",
+ "config" => {"token" => "HIPCHAT_TOKEN",
+ "room_name" => "AlwaysBeTesting",
+ "important_room_name" => "RoomName",
+ "user_name" => "AbtWorker"}
+ },
+ ]
+}
+
+p client.tasks.create('abt', params)
+
View
16 queue.rb
@@ -1,16 +0,0 @@
-require 'iron_worker_ng'
-client = IronWorkerNG::Client.new
-
-params = {"notifiers" => [{"class_name"=>"HipChatNotifier",
- "config"=>{"token"=>"HIPCHAT_TOKEN",
- "room_name"=>"AlwaysBeTesting",
- "important_room_name"=>"RoomName",
- "user_name"=>"AbtWorker"}},
- ],
- "git_url" => 'git://github.com/iron-io/iron_worker_ruby.git',
- "test_config" => {"iron"=>
- {"project_id"=>"YOUR_PROJECT_ID",
- "token"=>"YOUR_TOKEN"}}}
-
-client.tasks.create('abt', params)
-
Please sign in to comment.
Something went wrong with that request. Please try again.