Migration comments and logging

This commit is contained in:
nicktrn
2023-12-06 09:51:37 +00:00
parent a9754a0cbb
commit 6b702dac2f
3 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -208,7 +208,7 @@ export class ZodWorker<TMessageCatalog extends MessageCatalogSchema> {
this.#logDebug("Detected incoming migration", { latestMigration });
if (latestMigration > 10) {
// already migrated past v0.14 - nothing to do
this.#logDebug("Already migrated past v0.14 - nothing to do", { latestMigration });
return;
}
@@ -86,6 +86,8 @@ export class GraphileMigrationHelperService {
);
IF max_payloads IS NOT NULL
-- we only add payloads one at a time so batches will never exceed max_payloads
-- if we ever decide to enqueue more, this will have to be adjusted to prevent oversized batches
AND json_array_length(v_job.payload) >= max_payloads THEN
UPDATE ${env.WORKER_SCHEMA}._private_jobs
SET run_at = NOW()
@@ -188,10 +188,6 @@ export async function init() {
const migrationHelper = new GraphileMigrationHelperService();
await migrationHelper.call();
// const pgNotify = new PgNotifyService();
// await pgNotify.call("trigger:graphile:migrate", { latestMigration: 10 });
// await new Promise((resolve) => setTimeout(resolve, 10000))
if (env.WORKER_ENABLED === "true") {
await workerQueue.initialize();
}