Skip to content

Commit a33cecd

Browse files
committed
Add AutoPayService for processing auto-pay bills
1 parent 31f303c commit a33cecd

5 files changed

Lines changed: 656 additions & 8 deletions

File tree

instrumentation.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
*/
1010

1111
export async function register() {
12-
// CRITICAL: node-cron uses Node.js timers, which are NOT available in Edge runtime.
13-
// The register() function runs in BOTH Node.js and Edge runtimes.
12+
// node-cron (and drivative libraries) uses Node.js timers, which are not available in Edge
13+
// runtime. The register() function runs in both Node.js and Edge runtimes.
1414
// We must guard against Edge runtime to prevent crashes.
1515
if (process.env.NEXT_RUNTIME === 'nodejs') {
1616
console.log('[Instrumentation] Initializing scheduler (nodejs runtime)');
1717

18-
// Dynamic import is REQUIRED here:
18+
// Dynamic import is required here:
1919
// 1. Prevents Edge runtime from bundling Node.js-only code
2020
// 2. Keeps the cron library out of Edge bundles entirely
2121
const { SchedulerService } = await import('@/lib/services/SchedulerService');

0 commit comments

Comments
 (0)