Skip to content

Commit 643289d

Browse files
committed
Add temporal units to variable name
1 parent 533dfab commit 643289d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages/attachments/src/AttachmentQueue.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export class AttachmentQueue {
1616
attachmentsDirectory?: string;
1717
tableName?: string;
1818
logger?: ILogger;
19-
syncInterval: number = 30 * 1000;
2019
syncThrottleDuration: number;
2120
downloadAttachments: boolean = true;
2221
watchActiveAbortController?: AbortController;
@@ -30,7 +29,7 @@ export class AttachmentQueue {
3029
watchAttachments,
3130
logger,
3231
tableName = ATTACHMENT_TABLE,
33-
syncInterval = 30 * 1000,
32+
syncIntervalMs = 30 * 1000,
3433
syncThrottleDuration = 1000,
3534
downloadAttachments = true,
3635
archivedCacheLimit = 100
@@ -41,7 +40,7 @@ export class AttachmentQueue {
4140
watchAttachments: (onUpdate: (attachement: WatchedAttachmentItem[]) => void) => void;
4241
tableName?: string;
4342
logger?: ILogger;
44-
syncInterval?: number;
43+
syncIntervalMs?: number;
4544
syncThrottleDuration?: number;
4645
downloadAttachments?: boolean;
4746
archivedCacheLimit?: number;
@@ -52,8 +51,8 @@ export class AttachmentQueue {
5251
this.watchAttachments = watchAttachments;
5352
this.tableName = tableName;
5453
this.storageService = new StorageService(this.context, localStorage, remoteStorage, logger ?? db.logger);
55-
this.syncInterval = syncInterval;
5654
this.attachmentService = new AttachmentService(tableName, db);
55+
this.syncIntervalMs = syncIntervalMs;
5756
this.syncThrottleDuration = syncThrottleDuration;
5857
this.downloadAttachments = downloadAttachments;
5958
this.archivedCacheLimit = archivedCacheLimit;
@@ -69,7 +68,7 @@ export class AttachmentQueue {
6968
// Sync storage periodically
7069
this.periodicSyncTimer = setInterval(async () => {
7170
await this.syncStorage();
72-
}, this.syncInterval);
71+
}, this.syncIntervalMs);
7372

7473
// Sync storage when there is a change in active attachments
7574
this.attachmentService.watchActiveAttachments().registerListener({

0 commit comments

Comments
 (0)