1
0
Fork 0
mirror of synced 2024-09-29 16:51:33 +13:00

PR comments.

This commit is contained in:
Michael Drury 2022-09-24 16:55:22 +01:00
parent b20db4d22a
commit e3f4e744ab
2 changed files with 8 additions and 11 deletions

View file

@ -1,12 +1,7 @@
import { tenancy, logging } from "@budibase/backend-core" import { tenancy, logging } from "@budibase/backend-core"
import { plugins } from "@budibase/pro" import { plugins } from "@budibase/pro"
import env from "../../environment"
export const run = async () => { export const run = async () => {
// only a self hosted op
if (!env.SELF_HOSTED) {
return
}
try { try {
await tenancy.doInTenant(tenancy.DEFAULT_TENANT_ID, async () => { await tenancy.doInTenant(tenancy.DEFAULT_TENANT_ID, async () => {
await plugins.checkPluginQuotas() await plugins.checkPluginQuotas()

View file

@ -70,12 +70,14 @@ export const buildMigrations = () => {
break break
} }
case MigrationName.PLUGIN_COUNT: { case MigrationName.PLUGIN_COUNT: {
serverMigrations.push({ if (env.SELF_HOSTED) {
...definition, serverMigrations.push({
fn: pluginCount.run, ...definition,
silent: !!env.SELF_HOSTED, fn: pluginCount.run,
preventRetry: false, silent: !!env.SELF_HOSTED,
}) preventRetry: false,
})
}
} }
} }
} }