Skip to content

Instantly share code, notes, and snippets.

@Radagaisus
Created September 7, 2012 21:07
Show Gist options
  • Select an option

  • Save Radagaisus/3669648 to your computer and use it in GitHub Desktop.

Select an option

Save Radagaisus/3669648 to your computer and use it in GitHub Desktop.
Queueing Resque Jobs from NodeJS
create_job = (klass, args) ->
job = JSON.stringify
class: klass
args : args
redis.multi()
.sadd('resque:mysite:tasks:queues', 'facebook')
.rpush('resque:mysite:tasks:queue:facebook', job)
.exec()
create_job "MySite::GetFacebookFriends", [fb_id]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment