upd
This commit is contained in:
+2
-1
@@ -1 +1,2 @@
|
||||
/node_modules
|
||||
node_modules
|
||||
dist
|
||||
Vendored
+2
-2
@@ -208,7 +208,7 @@ async function checkScheduledSessions() {
|
||||
.get(`https://coord.graff.tech/start?build=${build}&location=a1`)
|
||||
.json();
|
||||
if (!result.stream) {
|
||||
console.log("Not result");
|
||||
console.log("Not result.stream");
|
||||
return;
|
||||
}
|
||||
const result2 = await got_cjs_1.default
|
||||
@@ -218,7 +218,7 @@ async function checkScheduledSessions() {
|
||||
},
|
||||
})
|
||||
.json();
|
||||
console.log("CRON Start session: ", result2);
|
||||
console.log("result2: ", result2);
|
||||
}
|
||||
else if ((0, date_fns_1.isAfter)(new Date(), (0, date_fns_1.parseISO)(session.endAt))) {
|
||||
const result = await got_cjs_1.default
|
||||
|
||||
+2
-4
@@ -242,21 +242,19 @@ async function checkScheduledSessions() {
|
||||
.json();
|
||||
|
||||
if (!result.stream) {
|
||||
console.log("Not result");
|
||||
console.log("Not result.stream");
|
||||
return;
|
||||
}
|
||||
|
||||
const result2 = await got
|
||||
.put(`${process.env.CRM_API_URL}/scheduled_sessions/${session.id}`, {
|
||||
json: {
|
||||
startAt: session.startAt,
|
||||
endAt: session.endAt,
|
||||
activeSessionId: result.stream,
|
||||
},
|
||||
})
|
||||
.json();
|
||||
|
||||
console.log("CRON Start session: ", result2);
|
||||
console.log("result2: ", result2);
|
||||
} else if (isAfter(new Date(), parseISO(session.endAt))) {
|
||||
const result = await got
|
||||
.post(
|
||||
|
||||
Reference in New Issue
Block a user