- API: EC2 Instances, 1-2 r3.large
- Database: MongoDB Database
- Runners: EC2 Instances, 4 r3.large
- Code Packages: AWS S3 or similar compatib storage
- IronMQ Backend: EC2 Instances, 2-3 c3.xlarge
This file contains 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
from celery import Celery | |
import iron_celery | |
celery = Celery('tasks', | |
broker='ironmq://{iron_project_id}:{iron_token}@' | |
backend='ironcache://{iron_project_id}:{iron_token}@') | |
@celery.task | |
def add(x, y): | |
return x + y |
This file contains 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
require 'sinatra' | |
require 'iron_mq' | |
def get_client | |
# Set these to your IronMQ credentials | |
config = { | |
token: '', | |
project_id: '' | |
} | |
@ironmq = IronMQ::Client.new(token: config[:token], project_id: config[:project_id]) |
This file contains 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
require 'rest-client' | |
require 'json' | |
require 'iron_mq' | |
license_key = 'my_key' | |
queue = ironmq.queue("some_active_queue") | |
size = queue.size |
This file contains 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
{ | |
"production": { | |
"token": "aaaaa", | |
"project_id": "bbbbbb" | |
}, | |
"staging": { | |
"token": "ccccc", | |
"project_id": "ddddd" | |
}, | |
"development": { |
This file contains 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
var worker = require("iron_worker"); | |
var client = new worker.Client({"project_id": "my project ID", "token": "my token"}); | |
client.tasksCreate("myWorker", "payload", {"timeout": 60}, function(error, response) { | |
// callback for when the task has been posted, with the response | |
}); | |
This file contains 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
runtime 'ruby' | |
exec 'hello_world.rb' | |
remote | |
gem 'nokogiri' |
This file contains 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
#*Step By Step Instruction* | |
##Set Apple TV to Aux Keys | |
-- | |
Press Aux (Device) Button | |
Hold Setup Key until Aux Button Blinks Twice | |
Type in code 31115 (Aux Button will blink twice, if it is a long blink try last three steps again) | |
##Fix Play and Pause Keys | |
-- |
This file contains 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 -L http://bit.ly/10hA8iC | bash |
This file contains 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
require 'iron_worker_ng' | |
client = IronWorkerNG::Client.new | |
start = Time.now | |
tasks = !ARGV[0].nil? ? ARGV[0].to_i : 5 | |
threads = !ARGV[1].nil? ? ARGV[1].to_i : 1 | |
cluster = !ARGV[2].nil? ? ARGV[2].to_s : "default" | |
priority = !ARGV[3].nil? ? ARGV[3].to_i : 0 |