fix(09): IN-01 add ordering comments cementing signalOutboxDrain() stays after the enqueue commit
This commit is contained in:
@@ -307,6 +307,7 @@ eventsRouter.post('/create', zValidator('json', eventFieldsSchema), async (c) =>
|
|||||||
payload: JSON.stringify(payload),
|
payload: JSON.stringify(payload),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// must stay AFTER the enqueue commit — worker selects committed pending rows only
|
||||||
signalOutboxDrain();
|
signalOutboxDrain();
|
||||||
return c.json({ uid }, 202);
|
return c.json({ uid }, 202);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -431,6 +432,7 @@ eventsRouter.patch('/:uid/edit', zValidator('json', eventFieldsSchema), async (c
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// must stay AFTER the enqueue commit — worker selects committed pending rows only
|
||||||
signalOutboxDrain();
|
signalOutboxDrain();
|
||||||
return c.json({ uid: newUid }, 202);
|
return c.json({ uid: newUid }, 202);
|
||||||
}
|
}
|
||||||
@@ -447,6 +449,7 @@ eventsRouter.patch('/:uid/edit', zValidator('json', eventFieldsSchema), async (c
|
|||||||
payload: JSON.stringify(payload),
|
payload: JSON.stringify(payload),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// must stay AFTER the enqueue commit — worker selects committed pending rows only
|
||||||
signalOutboxDrain();
|
signalOutboxDrain();
|
||||||
return c.json({ uid }, 202);
|
return c.json({ uid }, 202);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -522,6 +525,7 @@ eventsRouter.delete('/:uid', async (c) => {
|
|||||||
etag: eventRow.etag ?? undefined,
|
etag: eventRow.etag ?? undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// must stay AFTER the enqueue commit — worker selects committed pending rows only
|
||||||
signalOutboxDrain();
|
signalOutboxDrain();
|
||||||
return c.json({ uid }, 202);
|
return c.json({ uid }, 202);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user