Skip to content

Commit 9b223c2

Browse files
committed
logging
1 parent e6c0919 commit 9b223c2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/ws-worker/src/api/process-events.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export function eventProcessor(
108108
};
109109

110110
const sendBatch = async (name: string) => {
111+
console.log('sending batch', name);
111112
clearTimeout(batchTimeout!);
112113
batchTimeout = null;
113114

@@ -145,6 +146,7 @@ export function eventProcessor(
145146
};
146147

147148
const process = async (name: string, event: any) => {
149+
console.log('process', name);
148150
// TODO this actually shouldn't be here - should be done separately
149151
if (name !== 'workflow-log') {
150152
Sentry.addBreadcrumb({
@@ -207,8 +209,11 @@ export function eventProcessor(
207209
queue.push({ name, event });
208210

209211
if (queue.length == 1) {
212+
console.log(`[${name}] executing immediately`);
210213
// if an event is still in flight, will this cause a duplicate?
211214
next();
215+
} else {
216+
console.log(`[${name}] deffering event`);
212217
}
213218
};
214219

0 commit comments

Comments
 (0)