feature(api,worker): Override default timestamp with a date from the past (#76)
* feature(worker,api): refactor incoming events and support custom timestamps from the past * fix(queue): add retry logic to events queue * fix(worker): remove properties when merging server events
This commit is contained in:
committed by
GitHub
parent
c4a2ea4858
commit
4fe338c628
@@ -10,6 +10,7 @@ export interface EventsQueuePayloadIncomingEvent {
|
||||
projectId: string;
|
||||
event: TrackPayload & {
|
||||
timestamp: string;
|
||||
isTimestampFromThePast: boolean;
|
||||
};
|
||||
geo: {
|
||||
country: string | undefined;
|
||||
@@ -71,6 +72,11 @@ export const eventsQueue = new Queue<EventsQueuePayload>('events', {
|
||||
connection: getRedisQueue(),
|
||||
defaultJobOptions: {
|
||||
removeOnComplete: 10,
|
||||
attempts: 3,
|
||||
backoff: {
|
||||
type: 'exponential',
|
||||
delay: 1000,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user