1
0
Fork 0

Merge branch 'devel' of github.com:triAGENS/ArangoDB into devel

This commit is contained in:
Heiko Kernbach 2014-08-22 15:06:17 +02:00
commit 1ad3f36d90
1 changed files with 4 additions and 2 deletions

View File

@ -72,7 +72,8 @@ exports.work = function (job) {
success = true, success = true,
callback = null, callback = null,
now = Date.now(), now = Date.now(),
maxFailures; maxFailures,
result;
if (!cfg) { if (!cfg) {
console.warn('Unknown job type for job ' + job._key + ':', job.type); console.warn('Unknown job type for job ' + job._key + ':', job.type);
@ -87,7 +88,7 @@ exports.work = function (job) {
) || 0; ) || 0;
try { try {
cfg.execute(job.data, job._id); result = cfg.execute(job.data, job._id);
} catch (executeErr) { } catch (executeErr) {
console.error('Job ' + job._key + ' failed:', executeErr); console.error('Job ' + job._key + ' failed:', executeErr);
job.failures.push(flatten(executeErr)); job.failures.push(flatten(executeErr));
@ -120,6 +121,7 @@ exports.work = function (job) {
eval('(' + callback + ')(' + [ eval('(' + callback + ')(' + [
JSON.stringify(job._id), JSON.stringify(job._id),
JSON.stringify(job.data), JSON.stringify(job.data),
JSON.stringify(result),
JSON.stringify(job.failures) JSON.stringify(job.failures)
].join(', ') + ')'); ].join(', ') + ')');
} catch (callbackErr) { } catch (callbackErr) {