This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -H "Authorization: OAuth TOKEN" -H "Content-Type: application/json" \ | |
| -d '{"push_type":"multicast", "subscribers": [{"url": "http://mysterious-brook-1807.herokuapp.com/ironmq_push_1"}, {"url": "http://mysterious-brook-1807.herokuapp.com/ironmq_push_2"}]}' \ | |
| "https://mq-aws-us-east-1.iron.io/1/projects/PROJECT_ID/queues/pushq-demo-1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bufio" | |
| "bytes" | |
| "compress/bzip2" | |
| "compress/gzip" | |
| "flag" | |
| "fmt" | |
| "io" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| users = User.all | |
| users.each_slice(100) do |users_slice| | |
| puts "Queueing worker..." | |
| worker = NotificationWorker.new | |
| worker.users = users_slice | |
| # set other attributes that your worker needs to run | |
| worker.queue | |
| end |