Skip to content

Commit

Permalink
sync to 0.9.38
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeTWC1984 committed Oct 27, 2023
1 parent 9f59a8a commit 81c49cf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ module.exports = Class.create({
}

// only pull in properties we recognize
['progress', 'memo', 'complete', 'code', 'description', 'perf', 'update_event', 'table', 'html', 'chain', 'chain_data', 'chain_error', 'notify_success', 'notify_fail'].forEach(function (key) {
['progress', 'memo', 'complete', 'code', 'description', 'perf', 'update_event', 'table', 'html', 'chain', 'chain_data', 'chain_params', 'chain_error', 'notify_success', 'notify_fail'].forEach(function (key) {
if (key in data) job[key] = data[key];
});

Expand Down
12 changes: 11 additions & 1 deletion lib/scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ module.exports = Class.create({
}); // loaded state
},

safeJobLog(job) { // print less verbose, more readable job data on logging
if(!job) return ''
return Object.keys(job).filter(e => ! ["table", "secret", "env"].includes(e)).map(e => e + ': ' + ("params|workflow|perf".indexOf(e) > -1 ? JSON.stringify(job[e]) : job[e]) ).join(" | ")
},

schedulerMinuteTick: function (dargs, catch_up_only) {
// a new minute has started, see if jobs need to run
var self = this;
Expand Down Expand Up @@ -338,7 +343,12 @@ module.exports = Class.create({
source_event: old_job.event
});

self.logDebug(6, "Running event via chain reaction: " + job.title, job);

// merge in chain_params if applicable
if (!job.params) job.params = {};
if (old_job.chain_params) Tools.mergeHashInto(job.params, old_job.chain_params);

self.logDebug(6, "Running event via chain reaction: " + job.title, self.safeJobLog(job));

self.launchOrQueueJob(job, function (err, jobs_launched) {
if (err) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cronicle-edge",
"version": "1.7.4",
"version": "1.7.5",
"description": "A simple, distributed task scheduler and runner with a web based UI.",
"author": "Joseph Huckaby <[email protected]>",
"homepage": "https://github.com/jhuckaby/Cronicle",
Expand Down

0 comments on commit 81c49cf

Please sign in to comment.