File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
package/server/imports/actions Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ var add = function () {
2929 arguments : input . arguments
3030 } )
3131
32-
3332 if ( doc ) blockAdd = true
3433 }
3534
@@ -52,10 +51,14 @@ var add = function () {
5251 var doc = Utilities . collection . findOne ( {
5352 name : input . name ,
5453 arguments : input . arguments ,
54+ state : {
55+ $in : [ "pending" , "failure" ]
56+ }
5557 } )
5658
5759 if ( doc ) {
58- var initDate = jobDoc . created || new Date ;
60+ console . log ( doc )
61+ var initDate = jobDoc . due || new Date ;
5962
6063 jobId = Utilities . collection . update ( doc . _id , {
6164 $set : {
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ var toolbelt = function (jobDoc) {
4545 }
4646 }
4747
48- return this . document . data [ key ] || null ;
48+ return this . document . data [ key ] ;
4949 }
5050
5151 this . push = function ( key , value ) {
You can’t perform that action at this time.
0 commit comments