Skip to content

Commit a8e5dac

Browse files
committed
fix(grouper): remove cache key on event saving
1 parent e8664d7 commit a8e5dac

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

workers/grouper/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ export default class GrouperWorker extends Worker {
172172
usersAffected: incrementAffectedUsers ? 1 : 0,
173173
} as GroupedEventDBScheme);
174174

175+
this.cache.del(`${task.projectId}:${JSON.stringify({
176+
groupHash: uniqueEventHash,
177+
})}`)
178+
175179
/**
176180
* Increment daily affected users for the first event
177181
*/
@@ -182,7 +186,7 @@ export default class GrouperWorker extends Worker {
182186
* and we need to process this event as repetition
183187
*/
184188
if (e.code?.toString() === DB_DUPLICATE_KEY_ERROR) {
185-
console.log('DB_DUPLICATE_KEY_ERROR', e);
189+
console.log('DB_DUPLICATE_KEY_ERROR');
186190

187191
HawkCatcher.send(new Error('[Grouper] MongoError: E11000 duplicate key error collection'));
188192
await this.handle(task);

0 commit comments

Comments
 (0)