From d21b3d93144fb16e06ada49ac2d8692a1af6e0fe Mon Sep 17 00:00:00 2001 From: Devin Ivy Date: Tue, 21 Nov 2023 23:55:30 -0500 Subject: [PATCH] fix bsky periodic event reversal in service entrypoint --- ...al.ts => periodic-moderation-event-reversal.ts} | 0 packages/bsky/src/index.ts | 2 +- services/bsky/api.js | 14 +++++++------- 3 files changed, 8 insertions(+), 8 deletions(-) rename packages/bsky/src/db/{periodic-moderation-action-reversal.ts => periodic-moderation-event-reversal.ts} (100%) diff --git a/packages/bsky/src/db/periodic-moderation-action-reversal.ts b/packages/bsky/src/db/periodic-moderation-event-reversal.ts similarity index 100% rename from packages/bsky/src/db/periodic-moderation-action-reversal.ts rename to packages/bsky/src/db/periodic-moderation-event-reversal.ts diff --git a/packages/bsky/src/index.ts b/packages/bsky/src/index.ts index a5d901e3000..9e0075dce37 100644 --- a/packages/bsky/src/index.ts +++ b/packages/bsky/src/index.ts @@ -32,7 +32,7 @@ export type { ServerConfigValues } from './config' export type { MountedAlgos } from './feed-gen/types' export { ServerConfig } from './config' export { Database, PrimaryDatabase, DatabaseCoordinator } from './db' -export { PeriodicModerationEventReversal } from './db/periodic-moderation-action-reversal' +export { PeriodicModerationEventReversal } from './db/periodic-moderation-event-reversal' export { Redis } from './redis' export { ViewMaintainer } from './db/views' export { AppContext } from './context' diff --git a/services/bsky/api.js b/services/bsky/api.js index fac5b0a7c8b..cf63c951043 100644 --- a/services/bsky/api.js +++ b/services/bsky/api.js @@ -26,7 +26,7 @@ const { BskyAppView, ViewMaintainer, makeAlgos, - PeriodicModerationActionReversal, + PeriodicModerationEventReversal, } = require('@atproto/bsky') const main = async () => { @@ -110,18 +110,18 @@ const main = async () => { const viewMaintainer = new ViewMaintainer(migrateDb, 1800) const viewMaintainerRunning = viewMaintainer.run() - const periodicModerationActionReversal = new PeriodicModerationActionReversal( + const periodicModerationEventReversal = new PeriodicModerationEventReversal( bsky.ctx, ) - const periodicModerationActionReversalRunning = - periodicModerationActionReversal.run() + const periodicModerationEventReversalRunning = + periodicModerationEventReversal.run() await bsky.start() // Graceful shutdown (see also https://aws.amazon.com/blogs/containers/graceful-shutdowns-with-ecs/) process.on('SIGTERM', async () => { - // Gracefully shutdown periodic-moderation-action-reversal before destroying bsky instance - periodicModerationActionReversal.destroy() - await periodicModerationActionReversalRunning + // Gracefully shutdown periodic-moderation-event-reversal before destroying bsky instance + periodicModerationEventReversal.destroy() + await periodicModerationEventReversalRunning await bsky.destroy() viewMaintainer.destroy() await viewMaintainerRunning