feat(cms): improve catalog, editorial recovery and operations
This commit is contained in:
1 parent
2fead134e6
commit
c389c3893d
122 files changed
+8137
-703
No files matched your search
@@ -260,6 +260,13 @@ async function publishScheduledArticles(): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
async function reportWorkerHeartbeat(): Promise<void> {
|
||||
if (!redis) return;
|
||||
await redis
|
||||
.set("cms:jobs-worker:heartbeat", new Date().toISOString(), "EX", 600)
|
||||
.catch((error) => captureWorkerError(error, "WorkerHeartbeat"));
|
||||
}
|
||||
|
||||
async function main() {
|
||||
new Cron("* * * * *", () => {
|
||||
runCatalogExport().catch((e) =>
|
||||
@@ -307,6 +314,10 @@ async function main() {
|
||||
module: "jobs",
|
||||
});
|
||||
|
||||
new Cron("* * * * *", () => {
|
||||
void reportWorkerHeartbeat();
|
||||
});
|
||||
await reportWorkerHeartbeat();
|
||||
await Promise.all([
|
||||
backupEmulatorJar(),
|
||||
cleanupOldLogs(),
|
||||
|
||||
Reference in new issue
Block a user