Add local dev override for quotas

This commit is contained in:
Rory Powell 2022-01-11 18:47:42 +00:00
parent 76463bc368
commit 870bd6e898
1 changed files with 6 additions and 1 deletions

View File

@ -8,6 +8,8 @@ const {
} = require("../integrations/utils")
const quotaMigration = require("../migrations/sync_app_and_reset_rows_quotas")
const testing = false
// tenants without limits
const EXCLUDED_TENANTS = ["bb", "default", "bbtest", "bbstaging"]
@ -40,7 +42,10 @@ module.exports = async (ctx, next) => {
const tenantId = getTenantId()
// if in development or a self hosted cloud usage quotas should not be executed
if (env.isDev() || env.SELF_HOSTED || EXCLUDED_TENANTS.includes(tenantId)) {
if (
(env.isDev() || env.SELF_HOSTED || EXCLUDED_TENANTS.includes(tenantId)) &&
!testing
) {
return next()
}