Migrate to private class properties/methods
This commit is contained in:
parent
7dbe57084b
commit
aa9f53df57
100 changed files with 3795 additions and 3944 deletions
|
@ -26,8 +26,8 @@ const MIN_REFRESH_DELAY = MINUTE;
|
|||
let idCounter = 1;
|
||||
|
||||
export class RoutineProfileRefresher {
|
||||
private started = false;
|
||||
private id: number;
|
||||
#started = false;
|
||||
#id: number;
|
||||
|
||||
constructor(
|
||||
private readonly options: {
|
||||
|
@ -39,20 +39,20 @@ export class RoutineProfileRefresher {
|
|||
// We keep track of how many of these classes we create, because we suspect that
|
||||
// there might be too many...
|
||||
idCounter += 1;
|
||||
this.id = idCounter;
|
||||
this.#id = idCounter;
|
||||
log.info(
|
||||
`Creating new RoutineProfileRefresher instance with id ${this.id}`
|
||||
`Creating new RoutineProfileRefresher instance with id ${this.#id}`
|
||||
);
|
||||
}
|
||||
|
||||
public async start(): Promise<void> {
|
||||
const logId = `RoutineProfileRefresher.start/${this.id}`;
|
||||
const logId = `RoutineProfileRefresher.start/${this.#id}`;
|
||||
|
||||
if (this.started) {
|
||||
if (this.#started) {
|
||||
log.warn(`${logId}: already started!`);
|
||||
return;
|
||||
}
|
||||
this.started = true;
|
||||
this.#started = true;
|
||||
|
||||
const { storage, getAllConversations, getOurConversationId } = this.options;
|
||||
|
||||
|
@ -81,7 +81,7 @@ export class RoutineProfileRefresher {
|
|||
allConversations: getAllConversations(),
|
||||
ourConversationId,
|
||||
storage,
|
||||
id: this.id,
|
||||
id: this.#id,
|
||||
});
|
||||
} catch (error) {
|
||||
log.error(`${logId}: failure`, Errors.toLogFormat(error));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue