()
| 72 | * Used for execution paths that must avoid Trigger.dev cold starts. |
| 73 | */ |
| 74 | export async function getInlineJobQueue(): Promise<JobQueueBackend> { |
| 75 | if (cachedInlineBackend) { |
| 76 | return cachedInlineBackend |
| 77 | } |
| 78 | |
| 79 | const { DatabaseJobQueue } = await import('@/lib/core/async-jobs/backends/database') |
| 80 | cachedInlineBackend = new DatabaseJobQueue() |
| 81 | |
| 82 | logger.info('Inline job backend initialized: database') |
| 83 | return cachedInlineBackend |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Checks if jobs should be executed inline in-process. |
no test coverage detected