Example #1
0
 async.forEach(Object.keys(curtasks), function(taskid, cbLoop) {
   ijod.delOne(taskid, function() {
     // if the profile is active, we want to kill this task so it doesn't
     // get re-saved!
     isLocked(auth.pid, function(locked) {
       // one hour expirey so they auto cleanup
       if (locked) redis.setex(taskid, 3600, "taskUpdate deleted");
       cbLoop();
     });
   });
 }, function() {
 async.forEach(Object.keys(tasks), function(taskid, cbLoop) {
   logger.info('deleting task', taskid);
   ijod.delOne(taskid, function() {
     // if the profile is active, we want to kill this task so it doesn't
     // get re-saved!
     locksmith.isLocked(tasks[taskid].pid, function(locked) {
       // one hour expirey so they auto cleanup
       if (locked) redis.setex(taskid, 3600, "taskUpdate deleted");
       cbLoop();
     });
   });
 }, callback);
Example #3
0
 return async.forEach(Object.keys(tasks), function(taskid, cbLoop) {
   logger.warn("missing profile info, removing task",taskid);
   ijod.delOne(taskid, function() { cbLoop(); });
 }, function() {
Example #4
0
 return async.forEach(Object.keys(tasks), function (taskid, cbLoop) {
   ijod.delOne(taskid, cbLoop);
 }, function () {