fast fix for duration issue
This commit is contained in:
@@ -11,6 +11,9 @@ import { createSessionEnd } from './events.create-session-end';
|
|||||||
export async function eventsJob(job: Job<EventsQueuePayload>) {
|
export async function eventsJob(job: Job<EventsQueuePayload>) {
|
||||||
switch (job.data.type) {
|
switch (job.data.type) {
|
||||||
case 'createEvent': {
|
case 'createEvent': {
|
||||||
|
if (job.attemptsStarted > 1 && job.data.payload.duration < 0) {
|
||||||
|
job.data.payload.duration = 0;
|
||||||
|
}
|
||||||
return await createEvent(job.data.payload);
|
return await createEvent(job.data.payload);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user