diff --git a/packages/server/src/api/controllers/deploy/index.ts b/packages/server/src/api/controllers/deploy/index.ts index 4daf1a1d53..9b80af889c 100644 --- a/packages/server/src/api/controllers/deploy/index.ts +++ b/packages/server/src/api/controllers/deploy/index.ts @@ -89,7 +89,9 @@ async function initDeployedApp(prodAppId: any) { console.log("Enabled cron triggers for deployed app..") // sync the automations back to the dev DB - since there is now cron // information attached - await sdk.applications.syncApp(dbCore.getDevAppID(prodAppId), { automationOnly: true }) + await sdk.applications.syncApp(dbCore.getDevAppID(prodAppId), { + automationOnly: true, + }) } async function deployApp(deployment: any, userId: string) { diff --git a/packages/server/src/sdk/app/applications/sync.ts b/packages/server/src/sdk/app/applications/sync.ts index dd32002713..477fa41532 100644 --- a/packages/server/src/sdk/app/applications/sync.ts +++ b/packages/server/src/sdk/app/applications/sync.ts @@ -2,7 +2,10 @@ import env from "../../../environment" import { db as dbCore, context } from "@budibase/backend-core" import sdk from "../../" -export async function syncApp(appId: string, opts?: { automationOnly?: boolean }) { +export async function syncApp( + appId: string, + opts?: { automationOnly?: boolean } +) { if (env.DISABLE_AUTO_PROD_APP_SYNC) { return { message: @@ -35,7 +38,8 @@ export async function syncApp(appId: string, opts?: { automationOnly?: boolean } try { const replOpts = replication.appReplicateOpts() if (opts?.automationOnly) { - replOpts.filter = (doc: any) => doc._id.startsWith(dbCore.DocumentType.AUTOMATION) + replOpts.filter = (doc: any) => + doc._id.startsWith(dbCore.DocumentType.AUTOMATION) } await replication.replicate() } catch (err) {