feat: don't interrupt execution due to quota
This commit is contained in:
@@ -131,7 +131,7 @@ class Flow extends Base {
|
||||
});
|
||||
}
|
||||
|
||||
async throwIfQuotaExceeded() {
|
||||
async checkIfQuotaExceeded() {
|
||||
if (!appConfig.isCloud) return;
|
||||
|
||||
const user = await this.$relatedQuery('user');
|
||||
@@ -139,6 +139,18 @@ class Flow extends Base {
|
||||
|
||||
const hasExceeded = await usageData.checkIfLimitExceeded();
|
||||
|
||||
if (hasExceeded) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
async throwIfQuotaExceeded() {
|
||||
if (!appConfig.isCloud) return;
|
||||
|
||||
const hasExceeded = await this.checkIfQuotaExceeded();
|
||||
|
||||
if (hasExceeded) {
|
||||
throw new Error('The allowed task quota has been exhausted!');
|
||||
}
|
||||
|
Reference in New Issue
Block a user