code: function () {
          return ServerHeartbeatModel.find({
              status: _statusActive
          }).then(function (cursor) {
              return Q.ninvoke(cursor, 'toArray').then(function (servers) {
                  var serverIds = [];
                  servers.map(function (value) {
                      serverIds.push(value._id);
                  });
                  return _removeAllJobsOfUnknownServer(serverIds);
              });
          });
      }
docs: Remove unknown serverIds from jobslist, can happen while server restart