Skip to content

Commit

Permalink
Jobs.find() feature
Browse files Browse the repository at this point in the history
  • Loading branch information
msavin committed Jul 8, 2019
1 parent 9a258e7 commit 8b25805
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Empty file modified CHANGES.md
100644 → 100755
Empty file.
Empty file modified GUI.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions package/server/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ Jobs.run = function () {

// Update / manage a job even though it has not run

Jobs.manage = function () {
Jobs.find = function () {
check(arguments[0], String)

if (Utilities.registry.data[arguments[0]]) {
return Actions.manage.apply(null, arguments);
return Actions.find.apply(null, arguments);
} else {
Utilities.logger("invalid job name: " + arguments[0] || "not specified");
return false;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Utilities } from "../../utilities"
import { process } from "./process.js"

var manage = function () {
var find = function () {
// First, process the arguments
var input = Utilities.helpers.processJobArguments(arguments);

Expand All @@ -20,4 +20,4 @@ var manage = function () {
}
}

export { manage }
export { find }
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var toolbelt = function (jobDoc) {
}
}

return this.document.data[key] || null;
return this.document.data[key];
}

this.push = function (key, value) {
Expand Down
4 changes: 2 additions & 2 deletions package/server/imports/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ import { get } from './get'
import { clear } from './clear'
import { cancel } from './cancel'
import { execute } from './execute'
import { manage } from './manage'
import { find } from './find'
import { remove } from './remove'
import { replicate } from './replicate'
import { reschedule } from './reschedule'

var Actions = {
add: add,
get: get,
find: find,
clear: clear,
cancel: cancel,
execute: execute,
manage: manage,
remove: remove,
replicate: replicate,
reschedule: reschedule
Expand Down

0 comments on commit 8b25805

Please sign in to comment.