Skip to content

Commit

Permalink
Clean up names a little bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkaemming committed Dec 6, 2023
1 parent 61bc01e commit c3b65af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions plugin-server/src/main/pluginsServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export async function startPluginsServer(
let jobsConsumer: Consumer | undefined
let schedulerTasksConsumer: Consumer | undefined

let personOverridesWorker: PeriodicTask | undefined
let personOverridesPeriodicTask: PeriodicTask | undefined

let httpServer: Server | undefined // healthcheck server

Expand Down Expand Up @@ -150,7 +150,7 @@ export async function startPluginsServer(
jobsConsumer?.disconnect(),
stopSessionRecordingBlobConsumer?.(),
schedulerTasksConsumer?.disconnect(),
personOverridesWorker?.stop(),
personOverridesPeriodicTask?.stop(),
])

if (piscina) {
Expand Down Expand Up @@ -437,9 +437,9 @@ export async function startPluginsServer(
const postgres = hub?.postgres ?? new PostgresRouter(serverConfig)
const kafkaProducer = hub?.kafkaProducer ?? (await createKafkaProducerWrapper(serverConfig))

personOverridesWorker = new DeferredPersonOverrideWorker(postgres, kafkaProducer).run()
personOverridesWorker.promise.catch(async () => {
status.error('⚠️', 'Person override writer crashed! Requesting shutdown...')
personOverridesPeriodicTask = new DeferredPersonOverrideWorker(postgres, kafkaProducer).runTask()
personOverridesPeriodicTask.promise.catch(async () => {
status.error('⚠️', 'Person override worker task crashed! Requesting shutdown...')
await closeJobs()
process.exit(1)
})
Expand Down
2 changes: 1 addition & 1 deletion plugin-server/src/worker/ingestion/person-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ export class DeferredPersonOverrideWorker {
})
}

public run(): PeriodicTask {
public runTask(): PeriodicTask {
return new PeriodicTask(async () => {
status.debug('👥', 'Processing pending overrides...')
const overridesCount = await this.processPendingOverrides()
Expand Down

0 comments on commit c3b65af

Please sign in to comment.