fix(notifications): replace Cloud Run job with worker service
This commit is contained in:
12
backend/command-api/src/worker-server.js
Normal file
12
backend/command-api/src/worker-server.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { createWorkerApp } from './worker-app.js';
|
||||
import { dispatchPendingNotifications } from './services/notification-dispatcher.js';
|
||||
|
||||
const port = Number(process.env.PORT || 8080);
|
||||
const app = createWorkerApp({
|
||||
dispatch: () => dispatchPendingNotifications(),
|
||||
});
|
||||
|
||||
app.listen(port, () => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`krow-notification-worker listening on port ${port}`);
|
||||
});
|
||||
Reference in New Issue
Block a user