Scheduling bug fixes. IO-153
This commit is contained in:
@@ -102,17 +102,17 @@ exports.job = async (req, res) => {
|
||||
(bucket) =>
|
||||
bucket.gte <= jobHrs && (!!bucket.lt ? bucket.lt > jobHrs : true)
|
||||
)[0];
|
||||
console.log(pjobBucket.id, JobBucket.id, pjobBucket.id === JobBucket.id);
|
||||
if (pjobBucket.id === JobBucket.id) {
|
||||
//Theyre the same classification. Add it to the matrix.
|
||||
const compDate = moment(pjob.scheduled_completion);
|
||||
//Is the schedule completion behind today? If so, use today as it.
|
||||
let dateToUse;
|
||||
dateToUse = compDate.isValid()
|
||||
? moment().diff(compDate, "days") <= 0
|
||||
? moment().diff(compDate, "days") < 0
|
||||
? compDate.format("yyyy-MM-DD")
|
||||
: todayIsoString
|
||||
: todayIsoString;
|
||||
|
||||
bucketMatrix[dateToUse] = {
|
||||
...bucketMatrix[dateToUse],
|
||||
out: (bucketMatrix[dateToUse].out || 0) + 1,
|
||||
|
||||
Reference in New Issue
Block a user