How to tell when all jobs in meteor-job-collection have run?


#1

I have an application that requires distributed tasks due to needing to process a high number of processor-intensive jobs. I’ve got meteor-job-collection working very well (very easy to use), with a small “render farm” running node and successfully pulling jobs from the queue.

The one thing I haven’t solved yet is how to identify on the server when all jobs of a type have run. Let’s say I have 2 job types, type1 and type2. I’ll put several hundred type1 jobs into the queue, and when they’re all finished, I want to start putting type2 jobs into the queue. Creating type2 jobs requires that all type1 are finished, so I need some way of knowing when all type1 jobs are finished and to be able to run a function when that happens.

Any ideas?