Skip to content

Instantly share code, notes, and snippets.

@mplatts
Created June 4, 2015 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mplatts/7fdb33a708d8cbd52c42 to your computer and use it in GitHub Desktop.
Save mplatts/7fdb33a708d8cbd52c42 to your computer and use it in GitHub Desktop.
background job using meteor workers
if Meteor.isClient
Template.hello.events
'click button': ->
Meteor.call('loadJob')
if Meteor.isServer
class @TestJob extends Job
handleJob: ->
console.log 'Job complete'
Meteor.methods
loadJob: ->
Job.push new TestJob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment