@cloudnux/local-cloud-provider 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,11 +32,11 @@ interface QueueConfig {
32
32
  maxConcurrent: number;
33
33
  retryBackoff: boolean;
34
34
  persistence: {
35
- enabled: boolean;
35
+ enabled?: boolean;
36
36
  directory: string;
37
- saveInterval: number;
38
- saveOnShutdown: boolean;
39
- loadOnStartup: boolean;
37
+ saveInterval?: number;
38
+ saveOnShutdown?: boolean;
39
+ loadOnStartup?: boolean;
40
40
  };
41
41
  }
42
42
  interface QueueSummary {
@@ -1233,7 +1233,7 @@ var createPersistenceInitializer = (config, loadAllQueueStates, saveDirtyQueueSt
1233
1233
  if (config.persistence.loadOnStartup) {
1234
1234
  await loadAllQueueStates();
1235
1235
  }
1236
- if (config.persistence.saveInterval > 0) {
1236
+ if (config.persistence.saveInterval && config.persistence.saveInterval > 0) {
1237
1237
  intervalIdHolder.id = setInterval(saveDirtyQueueStates, config.persistence.saveInterval);
1238
1238
  }
1239
1239
  if (config.persistence.saveOnShutdown) {
@@ -2300,7 +2300,7 @@ var initializeScheduler = async (state, scheduleJobFn) => {
2300
2300
  state.schedulers = schedulers;
2301
2301
  state.executionHistory = executionHistory;
2302
2302
  }
2303
- const tickInterval = state.config.persistence.saveInterval > 0 ? state.config.persistence.saveInterval : state.config.cleanup.cleanupInterval;
2303
+ const tickInterval = (state.config.persistence.saveInterval || 0) > 0 ? state.config.persistence.saveInterval : state.config.cleanup.cleanupInterval;
2304
2304
  state.tickInterval = setInterval(async () => {
2305
2305
  if (state.isDirty && state.config.persistence.enabled) {
2306
2306
  state.isDirty = false;