@hazeljs/cron 0.7.9 → 0.8.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.
Files changed (2) hide show
  1. package/README.md +10 -10
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -218,26 +218,26 @@ export class DynamicJobService {
218
218
  CronModule.forRoot({
219
219
  // Enable/disable all cron jobs
220
220
  enabled: true,
221
-
221
+
222
222
  // Default timezone for all jobs
223
223
  timezone: 'UTC',
224
-
224
+
225
225
  // Prevent overlapping executions
226
226
  preventOverlap: true,
227
-
227
+
228
228
  // Retry failed jobs
229
229
  retry: {
230
230
  attempts: 3,
231
231
  delay: 1000,
232
232
  },
233
-
233
+
234
234
  // Logging
235
235
  logging: {
236
236
  enabled: true,
237
237
  logSuccess: true,
238
238
  logErrors: true,
239
239
  },
240
- })
240
+ });
241
241
  ```
242
242
 
243
243
  ### Job-Level Configuration
@@ -289,11 +289,11 @@ export class DatabaseCleanupService {
289
289
  async cleanupOldRecords() {
290
290
  const thirtyDaysAgo = new Date();
291
291
  thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30);
292
-
292
+
293
293
  await this.db.logs.deleteMany({
294
294
  where: { createdAt: { lt: thirtyDaysAgo } },
295
295
  });
296
-
296
+
297
297
  console.log('Old records cleaned up');
298
298
  }
299
299
  }
@@ -326,7 +326,7 @@ export class CacheService {
326
326
  const popularProducts = await this.db.products.findMany({
327
327
  where: { popular: true },
328
328
  });
329
-
329
+
330
330
  for (const product of popularProducts) {
331
331
  await this.cache.set(`product:${product.id}`, product, 3600);
332
332
  }
@@ -342,7 +342,7 @@ export class HealthMonitor {
342
342
  @Interval(30000) // Every 30 seconds
343
343
  async checkServices() {
344
344
  const services = ['database', 'redis', 'api'];
345
-
345
+
346
346
  for (const service of services) {
347
347
  const isHealthy = await this.checkServiceHealth(service);
348
348
  if (!isHealthy) {
@@ -362,7 +362,7 @@ export class SyncService {
362
362
  async syncData() {
363
363
  const localData = await this.getLocalData();
364
364
  const remoteData = await this.getRemoteData();
365
-
365
+
366
366
  const diff = this.calculateDiff(localData, remoteData);
367
367
  await this.applyChanges(diff);
368
368
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hazeljs/cron",
3
- "version": "0.7.9",
3
+ "version": "0.8.0",
4
4
  "description": "Cron job scheduling module for HazelJS framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -50,5 +50,5 @@
50
50
  "peerDependencies": {
51
51
  "@hazeljs/core": ">=0.2.0-beta.0"
52
52
  },
53
- "gitHead": "28c21c509aeca3bf2d0878fbee737d906b654c67"
53
+ "gitHead": "e0ed98ca074dd4f7472816d3c32ef576900dcca6"
54
54
  }