Skip to content

Commit

Permalink
Merge branch 'main' into robinjhuang-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjhuang authored Feb 6, 2025
2 parents 8d98863 + 494f32e commit c14866f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"config": {
"frontendVersion": "1.8.12",
"comfyVersion": "0.3.13",
"managerCommit": "1434b12c343b58a401f1c9f913965ceb0cfd089e",
"managerCommit": "b2094f773a6b04dbfa29604787b4f6b7f9ff8b81",
"uvVersion": "0.5.26"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/services/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class MixpanelTelemetry implements ITelemetry {
track(eventName: string, properties?: PropertyDict): void {
const defaultProperties = {
distinct_id: this.distinctId,
time: new Date(),
time: Date.now(),
$os: os.platform(),
};

Expand Down Expand Up @@ -124,7 +124,7 @@ export class MixpanelTelemetry implements ITelemetry {
*/
flush(): void {
while (this.queue.length > 0) {
const { eventName, properties } = this.queue.pop()!;
const { eventName, properties } = this.queue.shift()!;
this.mixpanelTrack(eventName, properties);
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/telemetry.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe('MixpanelTelemetry', () => {
expect(telemetry['queue'][0].properties).toMatchObject({
...properties,
distinct_id: expect.any(String),
time: expect.any(Date),
time: expect.any(Number),
});
});

Expand Down Expand Up @@ -142,7 +142,7 @@ describe('MixpanelTelemetry', () => {
properties: expect.objectContaining({
foo: 'bar',
distinct_id: expect.any(String),
time: expect.any(Date),
time: expect.any(Number),
}),
});
});
Expand Down

0 comments on commit c14866f

Please sign in to comment.