vsivsi / meteor-job-collection

A persistent and reactive job queue for Meteor, supporting distributed workers that can run anywhere.
https://atmospherejs.com/vsivsi/job-collection
Other
388 stars 68 forks source link

How to easily check if jobServer is running? #187

Closed luixal closed 8 years ago

luixal commented 8 years ago

This is, there are functions to start and shutdown the server, and there's a function for checking if a queue is running... is there any function to check whether the job server is running or not?

Or do you have to check your queues or keep an status variable on your own?

Thanks!

vsivsi commented 8 years ago

On the server you can check jc.stopped. If you want access to that on a client, you can write a meteor method to return that value, or write a custom publish function if you want it to be reactive on the client (triggered by events emitted for startJobServer and shutdownJobServer, see jc.events).

luixal commented 8 years ago

I finally went with the method solution because no reactivity was needed in this case. Thanks!