update
This commit is contained in:
33
patching/130-atproto-ozone-enable-daemon.patch
Normal file
33
patching/130-atproto-ozone-enable-daemon.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
--- a/services/ozone/api.js
|
||||
+++ b/services/ozone/api.js
|
||||
@@ -20,6 +20,7 @@ const {
|
||||
MultiImageInvalidator,
|
||||
} = require('@atproto/aws')
|
||||
const {
|
||||
Database,
|
||||
OzoneService,
|
||||
+ OzoneDaemon,
|
||||
envToCfg,
|
||||
envToSecrets,
|
||||
httpLogger,
|
||||
@@ -76,10 +77,17 @@ const main = async () => {
|
||||
const ozone = await OzoneService.create(cfg, secrets, { imgInvalidator })
|
||||
|
||||
await ozone.start()
|
||||
|
||||
httpLogger.info('ozone is running')
|
||||
|
||||
+ // Start OzoneDaemon for label events
|
||||
+ httpLogger.info('starting ozone daemon')
|
||||
+ const daemon = await OzoneDaemon.create(cfg, secrets)
|
||||
+ await daemon.start()
|
||||
+ httpLogger.info('ozone daemon is running')
|
||||
+
|
||||
// Graceful shutdown (see also https://aws.amazon.com/blogs/containers/graceful-shutdowns-with-ecs/)
|
||||
process.on('SIGTERM', async () => {
|
||||
httpLogger.info('ozone is stopping')
|
||||
|
||||
+ await daemon.destroy()
|
||||
await ozone.destroy()
|
||||
|
||||
httpLogger.info('ozone is stopped')
|
||||
Reference in New Issue
Block a user