ensure automation quotas are not incremented for test runs
This commit is contained in:
parent
93ccea7f06
commit
9cb20bcda2
|
@ -4,7 +4,7 @@ const AutomationEmitter = require("../events/AutomationEmitter")
|
|||
const { processObject } = require("@budibase/string-templates")
|
||||
const { DEFAULT_TENANT_ID } = require("@budibase/auth").constants
|
||||
const CouchDB = require("../db")
|
||||
const { DocumentTypes } = require("../db/utils")
|
||||
const { DocumentTypes, isDevAppID } = require("../db/utils")
|
||||
const { doInTenant } = require("@budibase/auth/tenancy")
|
||||
const env = require("../environment")
|
||||
const usage = require("../utilities/usageQuota")
|
||||
|
@ -96,8 +96,9 @@ class Orchestrator {
|
|||
return err
|
||||
}
|
||||
}
|
||||
// TODO: don't count test runs
|
||||
if (!env.SELF_HOSTED) {
|
||||
|
||||
// Increment quota for automation runs
|
||||
if (!env.SELF_HOSTED && !isDevAppID(this._appId)) {
|
||||
usage.update(usage.Properties.AUTOMATION, 1)
|
||||
}
|
||||
return this.executionOutput
|
||||
|
|
|
@ -157,7 +157,7 @@ exports.adminUser = async ctx => {
|
|||
rows: 4000,
|
||||
apps: 4,
|
||||
storage: 1000,
|
||||
users: 10
|
||||
users: 10,
|
||||
},
|
||||
})
|
||||
// }
|
||||
|
|
Loading…
Reference in New Issue