tenant idleMode - prevent running tasks on tenant being moved
MODIFY
src/async-task/TenantAsyncTask.ts
src/async-task/TenantAsyncTask.ts
@@ -17,7 +17,7 @@ export default abstract class TenantAsyncTask extends AbstractAsyncTask {
// Process them
for (const tenant of tenants.result) {
// Check if redirect domain is provided
- if (tenant.redirectDomain) {
+ if (tenant.redirectDomain || tenant.idleMode) {
// Ignore this tenant
continue;
}

MODIFY
src/scheduler/TenantSchedulerTask.ts
src/scheduler/TenantSchedulerTask.ts
@@ -17,7 +17,7 @@ export default abstract class TenantSchedulerTask extends SchedulerTask {
// Process them
for (const tenant of tenants.result) {
// Check if redirect domain is provided
- if (tenant.redirectDomain) {
+ if (tenant.redirectDomain || tenant.idleMode) {
// Ignore this tenant
continue;
}

MODIFY
src/types/Tenant.ts
src/types/Tenant.ts
@@ -10,6 +10,7 @@ export default interface Tenant extends CreatedUpdatedProps {
logo: string;
components: TenantComponent;
redirectDomain?: string;
+ idleMode?: boolean // Prevents batch and async tasks executions when moving the tenant to a different cloud infrastructure provider
}
export interface TenantComponent {

tenant idleMode - prevent running tasks on tenant being moved