- Fixed issue where errors from
getWork()
calls withinprocessJobs()
weren't being correctly annotated when passed to theerrorCallback
function. Thanks @bjarketrux. - Updated dependencies, including test changes for Sinon 2.0 and fibers 2.0
- Documentation improvements
- Fixed issue introduced in 1.5.0 which caused
processJobs()
with arrays of jobType strings to fail a new type check. Thanks @danielparas!
- Added
errorCallback
option tojob.processJobs()
. This gives workers a way to log network and other errors and do something other than write them toconsole.error
(the default and previous behavior). - Fixed an intermittent unit test failure due to a race condition in a prior test.
- Fixed a deprecation warning on “Job constructor should work without "new"” unit test
- Changed npm prepublish test to prepare test so that coffee-script compile still works on npm install
- Added additional node.js versions to TravisCI tests
- Switch TravisCI to use "trusty" image instead of "precise" to resolve node-gyp build issues for nodejs 7.9
- Updated npm dependencies
- Added support for new "callbackStrict" option to
processJobs()
. Whentrue
(defaultfalse
)processJobs()
will throw an error if a worker function calls its callback more than once. Previously it only wrote a message to stderr in all cases. That functionality is preserved with this change. - Fixed race condition in
processJobs()
that could causeJob.getWork()
to run after the queue is paused or stopped, leading to a zombie job on the server. - Added support for new optional
repeatRetries
job document attribute.
- Fixed error affecting all of the *Jobs functions which caused them to only process the first 256 jobs in the provided list of Id values.
- Updated npm dependencies
- Documentation update to support new server-side delayDeps option on
job.done()
. - Updated npm dependencies
- Don't automatically set the default value of the
repeatId
option tojob.done()
to maintain compatibility with older servers.
- Added ability for workers to specify a timeout for running jobs, so that if they crash or lose connectivity the job can fail and be restarted. Providing a falsy value of option
pollInterval
when callingJob.processJobs()
will now disable polling in favor of usingq.trigger
exclusively. - Fixed bug where
q.trigger()
caused agetWork()
call, even when the queue is paused. - Added
repeatId
option tojob.done()
which whentrue
will cause the successful return value of a repeating job to be the_id
of the newly scheduled job. - Added new methods
job.ready()
andjc.readyJobs()
to move jobs from waiting to ready.
- Added optional
collectionName
parameter tosetDDP
, enabling multiple DDP connections to be used by providing a mapping between collection names and connections. - Bumped npm deps
- Fixed bug that could cause JobQueue to grab more jobs than configured when
q.trigger()
or very short pollIntervals are used. - Bumped npm deps
- Added support for using a later.js object as
job.repeat({ schedule: {...} })
- Bumped npm deps
- j.startJobs and j.stopJobs have been renamed to j.startJobServer and j.shutdownJobServer respectively. The old versions will now generate deprecation warnings.
- Updated README to reflect name change to job-collection and fix broken links to Atmosphere
- Deprecated Job.makeJob(root, doc) in favor of "new Job(root, doc)" constructor signature.
- Added value getters for job.doc, job.type and job.data.
- Added
jq.trigger()
method to provide a mechanism to triggergetWork
using an alternative method topollInterval
- j.refresh() is now chainable
- Added Fiber support for non-Meteor node.js clients. See
Job.setDDP(ddp, [Fiber])
- Job constructor now supports supplying an object for
root
if that object has a string attribute namedroot
.
.fail()
now takes an error object instead of a string, just like.done()
- Bumped coffee-script and chai versions
- Fixed broken tests
- Changed validity check in
setDDP
, since ddp npm package no longer does login.
- Remove job_class.js from .gitignore. It causes problems with npm
- Added
until
option forjob.repeat()
,job.retry()
, job.restart() and job.rerun(). - Added
job.foreverDate
to indicate a Date that will never come - Added support for the
created
field in a job document
- Updated documentation to reflect a change in the default value of
cancelRepeats
onjob.save()
- Added support for new
backoff
option tojob.retry()
. Doc improvements.
- Fixed bug in processJobs that caused crash on Meteor.client side. Doc improvements.
- Fixed case where Meteor.setImmediate wasn't being used when available. Documentation improvements
- Erroneous npm publish... no changes from 0.0.6
- Documentation improvements
- Added links to jobCollection on Atmosphere. Fixed a couple of typos.
- Added class constants for DDP Method names and permission levels.
- Numerous small API refinements. Improved docs. Added unit tests for jobQueue.
- Numerous small API refinements. Improved docs. Added extensive unit tests.
- Changed tons of stuff, added documentation
- Initial version