bunqueue-dashboard 0.0.33 → 0.0.34
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.
- package/dist/.vite/manifest.json +62 -62
- package/dist/assets/{AddJob-ytpBLTCJ.js → AddJob-Cih9F84t.js} +1 -1
- package/dist/assets/{Alerts-C39RrGbQ.js → Alerts-Dp4Vclez.js} +1 -1
- package/dist/assets/{Benchmark-CM60tHbf.js → Benchmark-X_gdZun5.js} +1 -1
- package/dist/assets/{BulkAddJobs-BjL-xcQy.js → BulkAddJobs-CXTpYMZf.js} +1 -1
- package/dist/assets/{CopilotPanel-BGK1rw-V.js → CopilotPanel-CIXpcwkH.js} +1 -1
- package/dist/assets/{Cron-s1e-jgOo.js → Cron-DUHkse77.js} +1 -1
- package/dist/assets/{CronManager-BostU7BX.js → CronManager-BeYrLK2E.js} +1 -1
- package/dist/assets/{Database-ZluStWMz.js → Database-CXPb3XGr.js} +1 -1
- package/dist/assets/{Diagnostics-C0N5z5j-.js → Diagnostics-DDtoiDYT.js} +1 -1
- package/dist/assets/{Dlq-CtcLzs-b.js → Dlq-CX_uRblW.js} +1 -1
- package/dist/assets/{DlqControl-B_Z8KKn5.js → DlqControl-CazFmSEd.js} +1 -1
- package/dist/assets/{DlqPro-B68en6AG.js → DlqPro-HSffdtLJ.js} +1 -1
- package/dist/assets/{Flows-CD_bkCBM.js → Flows-CGmyghKF.js} +1 -1
- package/dist/assets/{JobInspector-DwRtyMz0.js → JobInspector-B9i1HnG5.js} +1 -1
- package/dist/assets/{Jobs-BUtcBKKk.js → Jobs-BZGtMnJI.js} +1 -1
- package/dist/assets/{JobsPro-BK_xd4ji.js → JobsPro-tmEN8f-P.js} +1 -1
- package/dist/assets/{Logs-CmVODYCI.js → Logs-DxUD9V2A.js} +1 -1
- package/dist/assets/{LogsPro-CJ-Il3LP.js → LogsPro-BTQhvPKj.js} +1 -1
- package/dist/assets/{McpServer-dMjyJKgT.js → McpServer-D5rwBg74.js} +1 -1
- package/dist/assets/{Metrics-Dsbeplz-.js → Metrics-CSPpBf1m.js} +1 -1
- package/dist/assets/{MetricsPro-BqxurxrJ.js → MetricsPro-DSn-3qNT.js} +1 -1
- package/dist/assets/{Overview-DH9C2dsf.js → Overview-StvHYRZ5.js} +1 -1
- package/dist/assets/{Pagination-DpxiBnt8.js → Pagination-eotgGQf9.js} +1 -1
- package/dist/assets/{QueueActions-D_QGBaVm.js → QueueActions-CibRLzrz.js} +1 -1
- package/dist/assets/{QueueControl-V0DJ6qk6.js → QueueControl-DwYNcMfI.js} +1 -1
- package/dist/assets/{QueueDetail-BgKAMJqf.js → QueueDetail-NMfKwj6E.js} +1 -1
- package/dist/assets/{QueueDetailPro-BkHYzGiq.js → QueueDetailPro-C8SBjX09.js} +1 -1
- package/dist/assets/{Queues-2_v7DcNi.js → Queues-BeTAi8V8.js} +1 -1
- package/dist/assets/{QueuesOverview-BySSkmB4.js → QueuesOverview-BfQO8NS4.js} +1 -1
- package/dist/assets/{S3Backup-CPADzKQE.js → S3Backup-BYkAtONl.js} +1 -1
- package/dist/assets/{S3BackupPro-CSrQYIDL.js → S3BackupPro-BP1Ch54R.js} +1 -1
- package/dist/assets/{ServerControl-C0tI1VDx.js → ServerControl-C85jYgyN.js} +1 -1
- package/dist/assets/{Settings-CSzoM5up.js → Settings-DjP28c_5.js} +1 -1
- package/dist/assets/{Usage-B4B7tmrc.js → Usage-DECeEsO2.js} +1 -1
- package/dist/assets/{UsagePro-CCBpgSDy.js → UsagePro-CD7dgt3d.js} +1 -1
- package/dist/assets/{Webhooks-aJz-GisQ.js → Webhooks-Ct-x8DD1.js} +1 -1
- package/dist/assets/{Workers-Bg8xKjkg.js → Workers-lP1BXHFq.js} +1 -1
- package/dist/assets/{WorkersPro-BOOCrXf8.js → WorkersPro-CAUqy3Cp.js} +1 -1
- package/dist/assets/{index-Bn2R06qm.js → index-Dr__4DsT.js} +3 -3
- package/dist/assets/install-DPCcfOYo.js +3 -0
- package/dist/assets/{useThroughputSeries-tb26_lkb.js → useThroughputSeries-Bpyg6Jaq.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/scripts/embedded.gen.ts +120 -120
- package/dist/assets/install-CUS8Kijb.js +0 -3
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var e={health:{ok:!0,status:`healthy`,uptime:133,version:`2.8.55`,queues:{waiting:13,active:2,delayed:6,completed:4,dlq:2},connections:{tcp:0,ws:0,sse:0},memory:{heapUsed:3,heapTotal:4,rss:68}},ping:{ok:!0,data:{pong:!0,time:1783035131368}},stats:{ok:!0,stats:{waiting:13,prioritized:7,delayed:6,active:2,dlq:2,completed:4,"waiting-children":0,totalPushed:34,totalPulled:8,totalCompleted:4,totalFailed:0,uptime:133882,cronJobs:2,cronPending:2,pushPerSec:.25,pullPerSec:.06,completePerSec:.03,failPerSec:0},memory:{heapUsed:3,heapTotal:4,rss:69,external:1,arrayBuffers:0},collections:{jobIndex:34,completedJobs:4,jobResults:0,jobLogs:0,customIdMap:0,jobLocks:0,clientJobs:0,clientJobsTotal:0,pendingDepChecks:0,stalledCandidates:0,processingTotal:2,queuedTotal:26,waitingDepsTotal:0,temporalIndexTotal:34,delayedHeapTotal:6}},storage:{ok:!0,data:{diskFull:!1,error:null,since:null}},dashboard:{ok:!0,stats:{waiting:13,active:2,delayed:6,completed:4,dlq:2,totalPushed:34,totalPulled:8,totalCompleted:4,totalFailed:0,uptime:133882},throughput:{pushPerSec:.25,pullPerSec:.06,completePerSec:.03,failPerSec:0},latency:{averages:{pushMs:.07645341176470588,pullMs:.3890205,ackMs:1.03645825},percentiles:{push:{p50:.1,p95:.5,p99:1},pull:{p50:.1,p95:1,p99:1},ack:{p50:2.5,p95:2.5,p99:2.5}}},memory:{heapUsed:3,heapTotal:4,rss:70},collections:{jobIndex:34,completedJobs:4,jobResults:0,jobLogs:0,customIdMap:0,jobLocks:0,clientJobs:0,clientJobsTotal:0,pendingDepChecks:0,stalledCandidates:0,processingTotal:2,queuedTotal:26,waitingDepsTotal:0,temporalIndexTotal:34,delayedHeapTotal:6},workers:{total:0,active:0,list:[],truncated:!1},crons:{total:2,list:[{name:`nightly-report`,queue:`reports`,schedule:`0 2 * * *`,repeatEvery:null,nextRun:17830368e5,executions:0},{name:`heartbeat`,queue:`notifications`,schedule:null,repeatEvery:6e4,nextRun:1783035191362,executions:0}],truncated:!1},storage:{diskFull:!1,error:null,since:null},timestamp:1783035131369},dashboardQueues:{ok:!0,queues:[{name:`emails`,waiting:2,delayed:0,active:0,dlq:2,paused:!1},{name:`image-processing`,waiting:7,delayed:0,active:2,dlq:0,paused:!1},{name:`reports`,waiting:0,delayed:6,active:0,dlq:0,paused:!1},{name:`notifications`,waiting:4,delayed:0,active:0,dlq:0,paused:!1}],total:4,limit:100,offset:0,timestamp:1783035131370},queuesSummary:[{name:`emails`,paused:!1,counts:{waiting:2,prioritized:7,active:0,completed:4,failed:2,delayed:0}},{name:`image-processing`,paused:!1,counts:{waiting:7,prioritized:0,active:2,completed:0,failed:0,delayed:0}},{name:`reports`,paused:!1,counts:{waiting:0,prioritized:0,active:0,completed:0,failed:0,delayed:6}},{name:`notifications`,paused:!1,counts:{waiting:4,prioritized:0,active:0,completed:0,failed:0,delayed:0}}],crons:{ok:!0,crons:[{name:`nightly-report`,queue:`reports`,schedule:`0 2 * * *`,repeatEvery:null,nextRun:17830368e5,executions:0,maxLimit:null,timezone:null},{name:`heartbeat`,queue:`notifications`,schedule:null,repeatEvery:6e4,nextRun:1783035191362,executions:0,maxLimit:null,timezone:null}]},webhooks:{ok:!0,data:{webhooks:[{id:`019f252c-f5e3-7000-883c-28cc5dc157a0`,url:`https://hooks.example.com/bunqueue`,events:[`job.completed`,`job.failed`],queue:null,createdAt:1783035131363,lastTriggered:178303512e4,successCount:42,failureCount:3,enabled:!0}],stats:{total:1,enabled:1}}},workers:{ok:!0,data:{workers:[],stats:{total:0,active:0,totalProcessed:0,totalFailed:0,activeJobs:0}}},dlqStats:{ok:!0,total:2,byQueue:{emails:2}},counts_emails:{ok:!0,counts:{waiting:2,prioritized:7,delayed:0,active:0,completed:4,failed:2,"waiting-children":0,paused:0}},dlq_emails:{ok:!0,entries:[{job:{id:`019f252b-8716-7000-bbec-d8c65e09f340`,queue:`emails`,data:{to:`user8@example.com`,subject:`Welcome 8`},createdAt:1783035037462,runAt:1783035037462,startedAt:1783035131364,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:3,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037462},{state:`active`,timestamp:1783035131364}]},enteredAt:1783035131367,reason:`timeout`,error:`Job exceeded its 30000 ms timeout while connecting to smtp.example.com`,attempts:[{attempt:0,startedAt:1783035131364,failedAt:1783035131367,reason:`timeout`,error:`Job exceeded its 30000 ms timeout while connecting to smtp.example.com`,duration:3}],retryCount:0,lastRetryAt:null,nextRetryAt:null,expiresAt:1783639931367},{job:{id:`019f252b-8750-7000-afa1-767720d8f433`,queue:`emails`,data:{to:`user13@example.com`,subject:`Welcome 13`},createdAt:1783035037520,runAt:1783035037520,startedAt:1783035131364,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:3,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037520},{state:`active`,timestamp:1783035131364}]},enteredAt:1783035131368,reason:`max_attempts`,error:`SMTP 550: mailbox unavailable (user13@example.com) — 3 of 3 attempts failed`,attempts:[{attempt:0,startedAt:1783035131364,failedAt:1783035131368,reason:`max_attempts`,error:`SMTP 550: mailbox unavailable (user13@example.com) — 3 of 3 attempts failed`,duration:4}],retryCount:0,lastRetryAt:null,nextRetryAt:null,expiresAt:1783639931368}],total:2},detail_emails:{ok:!0,name:`emails`,counts:{waiting:2,prioritized:7,delayed:0,active:0,completed:4,failed:2,"waiting-children":0,totalCompleted:4,totalFailed:0,paused:0},paused:!1,priorityCounts:{0:2,1:3,2:4},dlqPreview:[{id:`019f252b-8716-7000-bbec-d8c65e09f340`,data:{to:`user8@example.com`,subject:`Welcome 8`},attempts:0,createdAt:1783035037462},{id:`019f252b-8750-7000-afa1-767720d8f433`,data:{to:`user13@example.com`,subject:`Welcome 13`},attempts:0,createdAt:1783035037520}],timestamp:1783035131373,jobs:{waiting:[{id:`019f252b-86f2-7000-a45d-6e5e3dd4abf0`,priority:0,createdAt:1783035037426,runAt:1783035037426,attempts:0,progress:0},{id:`019f252b-872e-7000-91af-f820da905a23`,priority:0,createdAt:1783035037486,runAt:1783035037486,attempts:0,progress:0}],active:[],delayed:[],paused:[]}},"counts_image-processing":{ok:!0,counts:{waiting:7,prioritized:0,delayed:0,active:2,completed:0,failed:0,"waiting-children":0,paused:0}},"dlq_image-processing":{ok:!0,entries:[],total:0},"detail_image-processing":{ok:!0,name:`image-processing`,counts:{waiting:7,prioritized:0,delayed:0,active:2,completed:0,failed:0,"waiting-children":0,totalCompleted:0,totalFailed:0,paused:0},paused:!1,priorityCounts:{0:7},dlqPreview:[],timestamp:1783035131374,jobs:{waiting:[{id:`019f252b-8780-7000-9066-7f3a95bbb309`,priority:0,createdAt:1783035037568,runAt:1783035037568,attempts:0,progress:0},{id:`019f252b-878d-7000-9396-88a9de934b0c`,priority:0,createdAt:1783035037581,runAt:1783035037581,attempts:0,progress:0},{id:`019f252b-8799-7000-8433-2f4d874dfa3f`,priority:0,createdAt:1783035037593,runAt:1783035037593,attempts:0,progress:0},{id:`019f252b-87a5-7000-b3d2-48c6816be571`,priority:0,createdAt:1783035037605,runAt:1783035037605,attempts:0,progress:0}],active:[{id:`019f252b-8769-7000-bc44-cfc168232f53`,priority:0,createdAt:1783035037545,runAt:1783035037545,attempts:0,progress:0},{id:`019f252b-8775-7000-884a-63456175f48c`,priority:0,createdAt:1783035037557,runAt:1783035037557,attempts:0,progress:0}],delayed:[],paused:[]}},counts_reports:{ok:!0,counts:{waiting:0,prioritized:0,delayed:6,active:0,completed:0,failed:0,"waiting-children":0,paused:0}},dlq_reports:{ok:!0,entries:[],total:0},detail_reports:{ok:!0,name:`reports`,counts:{waiting:0,prioritized:0,delayed:6,active:0,completed:0,failed:0,"waiting-children":0,totalCompleted:0,totalFailed:0,paused:0},paused:!1,priorityCounts:{0:6},dlqPreview:[],timestamp:1783035131374,jobs:{waiting:[],active:[],delayed:[{id:`019f252b-87d8-7000-8f0c-e8ca5fec7d18`,priority:0,createdAt:1783035037656,runAt:1783035637656,attempts:0,progress:0},{id:`019f252b-87e3-7000-b0dc-18aac125e1ce`,priority:0,createdAt:1783035037667,runAt:1783035637667,attempts:0,progress:0},{id:`019f252b-87ee-7000-bb98-e9997d218441`,priority:0,createdAt:1783035037678,runAt:1783035637678,attempts:0,progress:0},{id:`019f252b-87fa-7000-9eb8-5b7a6d7aa7b4`,priority:0,createdAt:1783035037690,runAt:1783035637690,attempts:0,progress:0}],paused:[]}},counts_notifications:{ok:!0,counts:{waiting:4,prioritized:0,delayed:0,active:0,completed:0,failed:0,"waiting-children":0,paused:0}},dlq_notifications:{ok:!0,entries:[],total:0},detail_notifications:{ok:!0,name:`notifications`,counts:{waiting:4,prioritized:0,delayed:0,active:0,completed:0,failed:0,"waiting-children":0,totalCompleted:0,totalFailed:0,paused:0},paused:!1,priorityCounts:{0:4},dlqPreview:[],timestamp:1783035131375,jobs:{waiting:[{id:`019f252b-8823-7000-9455-de9cff6a56e2`,priority:0,createdAt:1783035037731,runAt:1783035037731,attempts:0,progress:0},{id:`019f252b-882e-7000-ae38-9c7fe01639d5`,priority:0,createdAt:1783035037742,runAt:1783035037742,attempts:0,progress:0},{id:`019f252b-883b-7000-8789-839b741a1011`,priority:0,createdAt:1783035037755,runAt:1783035037755,attempts:0,progress:0},{id:`019f252b-884d-7000-b703-96a357151ef4`,priority:0,createdAt:1783035037773,runAt:1783035037773,attempts:0,progress:0}],active:[],delayed:[],paused:[]}},emailsWaiting:{ok:!0,jobs:[{id:`019f252b-86c0-7000-a54e-3816c968ebf0`,queue:`emails`,data:{to:`user1@example.com`,subject:`Welcome 1`},createdAt:1783035037376,runAt:1783035037376,startedAt:null,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035037376,stallCount:0,priority:1,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037376}],_state:`prioritized`,state:`prioritized`},{id:`019f252b-86ce-7000-adfc-613a9495a6ef`,queue:`emails`,data:{to:`user2@example.com`,subject:`Welcome 2`},createdAt:1783035037390,runAt:1783035037390,startedAt:null,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035037390,stallCount:0,priority:2,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037390}],_state:`prioritized`,state:`prioritized`},{id:`019f252b-86fe-7000-894d-fe3ad935cc36`,queue:`emails`,data:{to:`user6@example.com`,subject:`Welcome 6`},createdAt:1783035037438,runAt:1783035037438,startedAt:null,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035037438,stallCount:0,priority:1,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037438}],_state:`prioritized`,state:`prioritized`},{id:`019f252b-870a-7000-91d2-ca4070505abe`,queue:`emails`,data:{to:`user7@example.com`,subject:`Welcome 7`},createdAt:1783035037450,runAt:1783035037450,startedAt:null,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035037450,stallCount:0,priority:2,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037450}],_state:`prioritized`,state:`prioritized`}]},emailsCompleted:{ok:!0,jobs:[{id:`019f252b-86da-7000-a9e3-6b1b74944d70`,queue:`emails`,data:{to:`user3@example.com`,subject:`Welcome 3`},createdAt:1783035037402,runAt:1783035037402,startedAt:1783035131364,completedAt:1783035131367,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:3,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037402},{state:`active`,timestamp:1783035131364},{state:`completed`,timestamp:1783035131367}],_state:`completed`,state:`completed`},{id:`019f252b-86e6-7000-a51e-e65a7cd2ce85`,queue:`emails`,data:{to:`user4@example.com`,subject:`Welcome 4`},createdAt:1783035037414,runAt:1783035037414,startedAt:1783035131364,completedAt:1783035131366,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:4,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037414},{state:`active`,timestamp:1783035131364},{state:`completed`,timestamp:1783035131366}],_state:`completed`,state:`completed`},{id:`019f252b-8722-7000-9270-14be63598def`,queue:`emails`,data:{to:`user9@example.com`,subject:`Welcome 9`},createdAt:1783035037474,runAt:1783035037474,startedAt:1783035131364,completedAt:1783035131366,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:4,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037474},{state:`active`,timestamp:1783035131364},{state:`completed`,timestamp:1783035131366}],_state:`completed`,state:`completed`},{id:`019f252b-875b-7000-8f4b-3d571d84663d`,queue:`emails`,data:{to:`user14@example.com`,subject:`Welcome 14`},createdAt:1783035037531,runAt:1783035037531,startedAt:1783035131364,completedAt:1783035131367,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:4,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037531},{state:`active`,timestamp:1783035131364},{state:`completed`,timestamp:1783035131367}],_state:`completed`,state:`completed`}]},oneJob:{ok:!0,job:{id:`019f252b-8716-7000-bbec-d8c65e09f340`,queue:`emails`,data:{to:`user8@example.com`,subject:`Welcome 8`},createdAt:1783035037462,runAt:1783035037462,startedAt:1783035131364,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:3,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037462},{state:`active`,timestamp:1783035131364}],state:`failed`}}},t={ok:!0,sqliteVersion:`3.45.1`,pageSize:4096,pageCount:640,journalMode:`wal`,freelistPages:8,tables:6,indexes:11,fileSize:2621440,walSize:49152},n={jobs:{columns:[`id`,`queue`,`state`,`priority`,`attempts`,`created_at`],types:{id:`TEXT`,queue:`TEXT`,state:`TEXT`,priority:`INTEGER`,attempts:`INTEGER`,created_at:`INTEGER`},rows:[[`019f252b-86c0-7000-a54e-3816c968ebf0`,`emails`,`prioritized`,1,0,1783035037376],[`019f252b-8769-7000-bc44-cfc168232f53`,`image-processing`,`active`,0,0,1783035037545],[`019f252b-86da-7000-a9e3-6b1b74944d70`,`emails`,`completed`,3,0,1783035037402],[`019f252b-8716-7000-bbec-d8c65e09f340`,`emails`,`failed`,3,0,1783035037462],[`019f252b-87d8-7000-8f0c-e8ca5fec7d18`,`reports`,`delayed`,0,0,1783035037656]]},queues:{columns:[`name`,`paused`,`concurrency`,`rate_limit`],types:{name:`TEXT`,paused:`INTEGER`,concurrency:`INTEGER`,rate_limit:`INTEGER`},rows:[[`emails`,0,10,0],[`image-processing`,0,4,100],[`reports`,0,2,0],[`notifications`,0,8,0]]},dlq:{columns:[`id`,`queue`,`reason`,`attempts`,`entered_at`],types:{id:`TEXT`,queue:`TEXT`,reason:`TEXT`,attempts:`INTEGER`,entered_at:`INTEGER`},rows:[[`019f252b-8716-7000-bbec-d8c65e09f340`,`emails`,`max attempts reached`,3,1783035037462],[`019f252b-8a02-7000-9b21-4c1f0b7e2a55`,`reports`,`handler threw`,5,1783035039101]]},crons:{columns:[`name`,`queue`,`pattern`,`tz`,`next_run`],types:{name:`TEXT`,queue:`TEXT`,pattern:`TEXT`,tz:`TEXT`,next_run:`INTEGER`},rows:[[`nightly-report`,`reports`,`0 2 * * *`,`UTC`,17830944e5],[`digest-email`,`emails`,`*/15 * * * *`,`UTC`,17830359e5]]},webhooks:{columns:[`id`,`url`,`events`,`active`,`failures`,`created_at`],types:{id:`TEXT`,url:`TEXT`,events:`TEXT`,active:`INTEGER`,failures:`INTEGER`,created_at:`INTEGER`},rows:[[`wh_9c31`,`https://hooks.example.com/bunqueue`,`job:completed,job:failed`,1,0,1783034e6]]},job_results:{columns:[`job_id`,`result`,`stored_at`],types:{job_id:`TEXT`,result:`TEXT`,stored_at:`INTEGER`},rows:[[`019f252b-86da-7000-a9e3-6b1b74944d70`,`{"messageId":"smtp-7712"}`,1783035037999],[`019f252b-8769-7000-bc44-cfc168232f53`,`{"bytes":184320}`,1783035038220],[`019f252b-87d8-7000-8f0c-e8ca5fec7d18`,`{"rows":128}`,1783035038511],[`019f252b-8a02-7000-9b21-4c1f0b7e2a55`,`{"error":"handler threw"}`,1783035039300],[`demo-csv-formula`,`=SUM(1,2)`,1783035039400]]}};function r(e){return Object.hasOwn(n,e)?n[e]:void 0}var i={ok:!0,tables:Object.entries(n).map(([e,t])=>({name:e,rows:t.rows.length,columns:t.columns.length}))};function a(e){let t=r(e),n=t?.columns??[`id`,`data`],i=t?.types??{};return{ok:!0,table:e,columns:n.map((e,t)=>({name:e,type:i[e]??`TEXT`,notNull:t===0,defaultValue:null,primaryKey:t===0})),indexes:[{name:`idx_${e}_${n[0]}`,unique:!0,columns:[n[0]]}],sql:`CREATE TABLE ${e} (${n.map(e=>`${e} ${i[e]??`TEXT`}`).join(`, `)})`,rowCount:t?.rows.length??0}}var o={"flow-order-9a3f":{id:`flow-order-9a3f`,queue:`orders`,data:{name:`process-order`,orderId:`demo-9a3f`,__childrenIds:[`flow-charge-1`,`flow-ship-2`,`flow-notify-3`]},state:`waiting-children`,priority:1,parentId:null,childrenIds:[`flow-charge-1`,`flow-ship-2`,`flow-notify-3`],dependsOn:[`flow-charge-1`,`flow-ship-2`,`flow-notify-3`]},"flow-charge-1":{id:`flow-charge-1`,queue:`payments`,data:{name:`charge-payment`,__parentId:`flow-order-9a3f`,__parentQueue:`orders`},state:`completed`,priority:2,parentId:`flow-order-9a3f`,childrenIds:[],dependsOn:[]},"flow-ship-2":{id:`flow-ship-2`,queue:`shipping`,data:{name:`ship-order`,__parentId:`flow-order-9a3f`,__parentQueue:`orders`,__childrenIds:[`flow-label-4`]},state:`waiting-children`,priority:1,parentId:`flow-order-9a3f`,childrenIds:[`flow-label-4`],dependsOn:[`flow-label-4`]},"flow-label-4":{id:`flow-label-4`,queue:`shipping`,data:{name:`create-label`,__parentId:`flow-ship-2`,__parentQueue:`shipping`},state:`waiting`,priority:0,parentId:`flow-ship-2`,childrenIds:[],dependsOn:[]},"flow-notify-3":{id:`flow-notify-3`,queue:`emails`,data:{name:`notify-customer`,__parentId:`flow-order-9a3f`,__parentQueue:`orders`},state:`delayed`,priority:0,parentId:`flow-order-9a3f`,childrenIds:[],dependsOn:[`flow-charge-1`]}},s=t=>e[t]?.jobs??[],c=e.oneJob.job,l=[...s(`emailsWaiting`),...s(`emailsCompleted`),...c?[c]:[]],u=[`emails`,`image-processing`,`reports`,`notifications`];function d(e,t,n){return t===`emails`?e:{...e,id:`${t}-${String(e.id).slice(-12)}-${n}`,queue:t}}function f(e){if(o[e])return o[e];let t=l.find(t=>t.id===e);if(t)return t;for(let t of u){let n=l.map((e,n)=>d(e,t,n)).find(t=>t.id===e);if(n)return n}return{...c??{queue:`emails`,state:`failed`},id:e,customId:e.startsWith(`demo-custom:`)?e.slice(12):null}}var p={command:`bunqueue start`,httpPort:6790,tcpPort:6791,dataPath:`./data/bunqueue.db`,extraEnv:{LOG_LEVEL:`info`}},m=()=>({status:`running`,pid:42317,startedAt:Date.now()-36e5,exitCode:null,healthy:!0,version:`2.8.55`,config:p,runningConfig:p,db:{path:p.dataPath,exists:!0,size:2621440,walSize:49152,shmSize:32768,totalSize:2703360,mtimeMs:Date.now()-12e3}}),h=()=>{let e=Date.now();return{ok:!0,data:{workers:[{id:`wrk-9f21c3d0`,name:`worker-emails-1`,queues:[`emails`,`notifications`],concurrency:10,hostname:`worker-01`,pid:3411,status:`active`,registeredAt:e-54e5,lastSeen:e-4e3,activeJobs:0,processedJobs:1284,failedJobs:6,currentJob:null,uptime:54e5},{id:`wrk-4b77aa19`,name:`worker-media-1`,queues:[`image-processing`],concurrency:4,hostname:`worker-02`,pid:3987,status:`active`,registeredAt:e-51e5,lastSeen:e-2e3,activeJobs:2,processedJobs:342,failedJobs:1,currentJob:`019f252b-8769-7000-bc44-cfc168232f53`,uptime:51e5},{id:`wrk-c05e881f`,name:`worker-batch-1`,queues:[`reports`],concurrency:2,hostname:`worker-02`,pid:4102,status:`stale`,registeredAt:e-9e6,lastSeen:e-12e5,activeJobs:0,processedJobs:57,failedJobs:0,currentJob:null,uptime:78e5}],stats:{total:3,active:2,totalProcessed:1683,totalFailed:7,activeJobs:2}}}},g=()=>{let e=Date.now(),t=(t,n,r,i)=>({seq:t,ts:e-n,stream:r,line:i});return{lines:[t(1,8e3,`sys`,`starting: bunqueue start`),t(2,7800,`stdout`,`bunqueue v2.8.55 — HTTP :6790, TCP :6791`),t(3,7600,`stdout`,`SQLite ready (WAL) at ./data/bunqueue.db`),t(4,5e3,`stdout`,`worker registered: image-processing`),t(5,1200,`stdout`,`health ok — 4 queues, 34 jobs`)]}},_=e=>e.replace(/[A-Z]/g,e=>e.toLowerCase());function v(e,t,n=!1){let i=r(e);if(n&&!i)throw Error(`No such table: ${e}`);let a=i?.columns??[`id`,`data`],o=i?.rows??[],s=new URLSearchParams(t);if(n){let e=new Set([`orderBy`,`dir`,`fcol`,`fop`,`fval`]);for(let t of s.keys()){if(!e.has(t))throw Error(`Unknown database export option: ${t}`);if(s.getAll(t).length!==1)throw Error(`Duplicate database export option: ${t}`)}}let c=s.get(`orderBy`);if(n&&c===``)throw Error(`Database export orderBy must not be empty`);let l=c||null,u=s.get(`dir`);if(n&&u!==null&&u!==`asc`&&u!==`desc`)throw Error(`Database export dir must be "asc" or "desc"`);let d=u===`desc`?`desc`:`asc`,f=s.get(`fcol`),p=s.get(`fop`),m=s.get(`fval`);if(n&&(f!==null||p!==null||m!==null)&&(!f||!m||p!==`contains`&&p!==`eq`&&p!==`ne`))throw Error(`Database export filter requires valid fcol, fop and fval values`);let h=f&&m?{column:f,op:p===`eq`?`eq`:p===`ne`?`ne`:`contains`,value:m}:null,g=h?a.indexOf(h.column):-1;if(h&&g<0&&n)throw Error(`No such column: ${h.column}`);let v=h&&g>=0?o.filter(e=>{let t=e[g];if(t==null)return!1;let n=String(t);return h.op===`eq`?n===h.value:h.op===`ne`?n!==h.value:_(n).includes(_(h.value))}):o,y=l?a.indexOf(l):-1;if(l&&y<0&&n)throw Error(`No such column: ${l}`);return{table:e,columns:a,rows:y>=0?[...v].sort((e,t)=>{let n=e[y],r=t[y],i=n==null?r==null?0:-1:r==null?1:n<r?-1:+(n>r);return d===`desc`?-i:i}):v,orderBy:y>=0?l:null,dir:d,filter:g>=0?h:null}}function y(e,t){let n=v(e,t),{columns:r,orderBy:i,dir:a,filter:o}=n,s=new URLSearchParams(t),c=(e,t)=>{let n=Number(e);return e!==null&&Number.isFinite(n)&&n>=0?n:t},l=c(s.get(`limit`),50),u=c(s.get(`offset`),0),d=n.rows.slice(u,u+(l>0?l:n.rows.length));return{ok:!0,table:e,columns:r,rows:d,rowids:d.map((e,t)=>u+t+1),truncatedCells:d.map(e=>e.map(()=>!1)),total:n.rows.length,limit:l,offset:u,orderBy:i,dir:a,filter:o}}var b=2e5,x=16*1024*1024,S=2e3,C=2e3;function w(e){let t,n=!1;if(e==null)t=``;else if(typeof e==`string`)t=new TextEncoder().encode(e).byteLength>S?`${[...e].slice(0,C).join(``)}…`:e,n=!0;else if(typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`)t=String(e);else if(e instanceof Uint8Array)t=`<blob ${e.byteLength} B>`,n=!0;else throw Error(`Database export produced an unsupported SQLite value`);let r=n&&/^[=+\-@\t\r]/.test(t)?`'${t}`:t;return/[",\r\n]/.test(r)?`"${r.replaceAll(`"`,`""`)}"`:r}function T(e,t){try{let n=v(e,t,!0),r=new TextEncoder,i=[],a=0,o=0,s=null,c=e=>{let t=r.encode(e);return a+t.byteLength>x?!1:(i.push(t),a+=t.byteLength,!0)};if(!c(n.columns.map(w).join(`,`)))throw Error(`Database export header exceeds the ${x}-byte export limit`);for(let e of n.rows){if(o>=b){s=`rows`;break}if(!c(`\r\n${e.map(w).join(`,`)}`)){s=`bytes`;break}o++}let l=new Uint8Array(a),u=0;for(let e of i)l.set(e,u),u+=e.byteLength;return new Response(l,{status:200,headers:{"Content-Type":`text/csv; charset=utf-8`,"Content-Length":String(a),"Cache-Control":`no-store`,"X-Content-Type-Options":`nosniff`,"X-Bunqueue-Db-Export-Version":`1`,"X-Bunqueue-Db-Export-Table":encodeURIComponent(n.table),"X-Bunqueue-Db-Export-Rows":String(o),"X-Bunqueue-Db-Export-Bytes":String(a),"X-Bunqueue-Db-Export-Cap":s??`none`,"Access-Control-Expose-Headers":`Content-Length, X-Bunqueue-Db-Export-Version, X-Bunqueue-Db-Export-Table, X-Bunqueue-Db-Export-Rows, X-Bunqueue-Db-Export-Bytes, X-Bunqueue-Db-Export-Cap`}})}catch(e){return new Response(JSON.stringify({ok:!1,error:e instanceof Error?e.message:String(e)}),{status:400,headers:{"Content-Type":`application/json`}})}}var E=new Set([`events`,`health`,`ping`,`stats`,`storage`,`dashboard`,`queues`,`jobs`,`crons`,`webhooks`,`workers`,`dlq`,`control`,`db`,`gc`,`heapstats`]);function D(n,r,o){let s=n.replace(/\/+$/,``)||`/`,c=s.split(`/`).filter(Boolean);if(c[0]===`control`)return c[1]===`logs`?g():c[1]===`config`?p:m();if(r!==`GET`)return s===`/gc`?{ok:!0,before:{heapUsed:118,heapTotal:176,rss:214},after:{heapUsed:94,heapTotal:150,rss:181}}:s.endsWith(`/db/query`)?{ok:!0,columns:[`note`],rows:[[`This is the demo. Queries run against a static in-memory sample.`]],rowCount:1,truncated:!1,ms:.4}:s.endsWith(`/jobs`)||s.endsWith(`/jobs/bulk`)?{ok:!0,id:`demo-${c.join(`-`)}`,ids:[`demo-1`]}:{ok:!0};if(s===`/workers`)return h();if(s===`/heapstats`)return{ok:!0,memory:{heapUsed:94,heapTotal:150,rss:181},heap:{objectCount:486204,protectedCount:1284,globalCount:312},collections:{},topObjectTypes:[{type:`Structure`,count:42118},{type:`Object`,count:31064},{type:`Function`,count:18902},{type:`string`,count:12447},{type:`Array`,count:8021}]};let u={"/health":`health`,"/ping":`ping`,"/stats":`stats`,"/storage":`storage`,"/dashboard":`dashboard`,"/dashboard/queues":`dashboardQueues`,"/queues/summary":`queuesSummary`,"/crons":`crons`,"/webhooks":`webhooks`,"/dlq/stats":`dlqStats`};if(u[s])return e[u[s]];if(c[0]===`dashboard`&&c[1]===`queues`&&c[2])return e[`detail_${c[2]}`]??e.detail_emails;if(c[0]===`queues`&&c[1]){let t=decodeURIComponent(c[1]);if(c[2]===`counts`)return e[`counts_${t}`]??{ok:!0,counts:{}};if(c[2]===`dlq`&&c[3]===`stats`)return{ok:!0,stats:t===`emails`?{total:2,byReason:{timeout:1,max_attempts:1}}:{total:0,byReason:{}}};if(c[2]===`dlq`)return e[`dlq_${t}`]??{ok:!0,entries:[],total:0};if(c[2]===`stall-config`)return{ok:!0,config:{enabled:!0,stallInterval:3e4,maxStalls:3,gracePeriod:5e3}};if(c[2]===`dlq-config`)return{ok:!0,config:{autoRetry:!1,autoRetryInterval:6e4,maxAutoRetries:3,maxAge:null,maxEntries:1e3}};if(c[2]===`jobs`&&c[3]===`list`){let e=new URLSearchParams(o),n=(e.get(`states`)??e.get(`state`)??``).split(`,`).map(e=>e.trim()).filter(Boolean),r=e=>n.length===0||n.includes(String(e))||n.includes(`waiting`)&&e===`prioritized`;return{ok:!0,jobs:l.filter(e=>r(e.state)).map((e,n)=>d(e,t,n))}}}if(c[0]===`jobs`&&c[1]){let e=decodeURIComponent(c[1]);if(c[1]===`custom`&&c[2])return{ok:!0,job:f(`demo-custom:${decodeURIComponent(c[2])}`)};if(c[2]===`result`)return{ok:!0,id:e,result:{sent:!0,provider:`demo`}};if(c[2]===`logs`){let e=[`[info] picked up by worker-emails-1`,`[info] connecting to smtp.example.com:587`,`[error] SMTP 550: mailbox unavailable — will retry with backoff`];return{ok:!0,data:{logs:e,count:e.length}}}if(!c[2])return{ok:!0,job:f(e)}}if(c[0]===`db`){if(c[1]===`info`)return t;if(c[1]===`tables`&&!c[2])return i;if(c[1]===`tables`&&c[2]){let e=decodeURIComponent(c[2]);return c[3]===`schema`?a(e):c[3]===`cell`?{ok:!0,value:`demo cell value`}:y(e,o)}}return{ok:!0}}var O=e=>new Response(JSON.stringify(e),{status:200,headers:{"Content-Type":`application/json`}});function k(e){let t=new TextEncoder,n=[`emails`,`image-processing`,`reports`,`notifications`],r=[`job:active`,`job:completed`,`job:completed`,`job:waiting`,`job:failed`,`job:active`],i=new ReadableStream({start(i){let a=0,o=!1,s,c=()=>{if(!o){o=!0,clearInterval(s);try{i.close()}catch{}}};i.enqueue(t.encode(`data: {"connected":true}
|
|
2
|
+
|
|
3
|
+
`)),s=setInterval(()=>{if(o)return;let e=r[a%r.length],s=n[a%n.length],l=JSON.stringify({queue:s,jobId:`demo-${a}`,name:s,timestamp:Date.now()});try{i.enqueue(t.encode(`event: ${e}\ndata: ${l}\n\n`))}catch{c()}a+=1},1400),e?.aborted?c():e?.addEventListener(`abort`,c,{once:!0})}});return new Response(i,{status:200,headers:{"Content-Type":`text/event-stream`}})}var A=!1;function j(){if(A||typeof window>`u`)return()=>void 0;A=!0;let e=window.fetch,t=e.bind(window),n=`/`.replace(/\/+$/,``),r=(e,r)=>{let i=e instanceof Request?e:null,a=typeof e==`string`?e:e instanceof URL?e.href:i?.url??``,o=(r?.method??i?.method??`GET`).toUpperCase(),s;try{s=new URL(a,window.location.origin)}catch{return t(e,r)}let c=s.pathname;n&&(c===n||c.startsWith(`${n}/`))&&(c=c.slice(n.length)||`/`),(c===`/api`||c.startsWith(`/api/`))&&(c=c.slice(4)||`/`);let l=c.split(`/`).filter(Boolean)[0];if(!l||!E.has(l))return t(e,r);if(l===`events`)return Promise.resolve(k(r?.signal??i?.signal));if(o===`GET`){let e=c.replace(/\/+$/,``).split(`/`).filter(Boolean);if(e.length===4&&e[0]===`db`&&e[1]===`tables`&&e[3]===`export`)return Promise.resolve(T(decodeURIComponent(e[2]),s.search))}return Promise.resolve(O(D(c,o,s.search)))};window.fetch=r;let i=!1;return()=>{i||(i=!0,window.fetch===r&&(window.fetch=e),A=!1)}}export{j as installDemo};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./cn-CMFYpumL.js";import{g as t}from"./react-vendor-Bjui4wS4.js";import{o as n}from"./connectionStore-Cd9-3Fw0.js";import{k as r,st as i}from"./index-
|
|
1
|
+
import{r as e}from"./cn-CMFYpumL.js";import{g as t}from"./react-vendor-Bjui4wS4.js";import{o as n}from"./connectionStore-Cd9-3Fw0.js";import{k as r,st as i}from"./index-Dr__4DsT.js";var a=e(t(),1),o=1e3,s={push:[],complete:[],fail:[],depth:[]},c=()=>typeof performance<`u`?performance.now():Date.now(),l=(e,t)=>`${e}\u0000${t}`;function u(e=60){let t=l(n(e=>e.baseUrl),n(e=>e.token)),[u,d]=(0,a.useState)(s),[f,p]=(0,a.useState)(null),[m,h]=(0,a.useState)(null),g=(0,a.useRef)(0),_=(0,a.useRef)(0),v=(0,a.useRef)(t),y=v.current===t;return(0,a.useEffect)(()=>{let n=++g.current,a=new AbortController,l=!1;v.current!==t&&(v.current=t,d(s),p(null),h(null),_.current=0);let u=r(()=>typeof document<`u`&&document.hidden),f=async()=>{if(l||!u())return;l=!0;let t=c();try{let[r,c]=await Promise.all([i.overview({signal:a.signal}),i.stats({signal:a.signal})]);if(a.signal.aborted||g.current!==n)return;let l=r?.stats,u=r?.throughput,f=c?.stats;if(!l||!u||!f)throw Error(`malformed telemetry body`);if(![l.waiting,l.active,l.delayed,l.completed,l.dlq,l.totalPushed,l.totalPulled,l.totalCompleted,l.totalFailed,l.uptime,u.pushPerSec,u.completePerSec,u.failPerSec,f.waiting,f.prioritized,f.active,f.delayed,f[`waiting-children`]].every(e=>typeof e==`number`&&Number.isFinite(e)))throw Error(`malformed telemetry numeric metrics`);let m=u.pushPerSec,v=u.completePerSec,y=u.failPerSec,b=f.waiting+f.prioritized+f.active+f.delayed+f[`waiting-children`],x=_.current>0&&t-_.current>4*o;_.current=t,p(r),h(null),d(t=>{let n=x?s:t;return{push:[...n.push,m].slice(-e),complete:[...n.complete,v].slice(-e),fail:[...n.fail,y].slice(-e),depth:[...n.depth,b].slice(-e)}})}catch(e){!a.signal.aborted&&g.current===n&&h(e)}finally{l=!1}};f();let m=setInterval(f,o);return()=>{clearInterval(m),a.abort(),g.current===n&&(g.current+=1)}},[e,t]),y?{...u,latest:f,error:m}:{...s,latest:null,error:null}}function d(e,t=o){if(e.length<2)return{slope:0,label:`steady`,draining:!1};let n=e.length,r=(n-1)/2,i=e.reduce((e,t)=>e+t,0)/n,a=0,s=0;for(let t=0;t<n;t++)a+=(t-r)*(e[t]-i),s+=(t-r)**2;let c=s===0?0:a/s,l=t>0?o/t*c:c,u=l<-.05;return{slope:l,label:u?`draining`:l>.05?`accumulating`:`steady`,draining:u}}export{u as n,d as t};
|
package/dist/index.html
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
content="Fully drive a bunqueue server from one UI: queues, jobs, DLQ, cron, webhooks, workers, and start/stop/restart. Live demo, no signup."
|
|
47
47
|
/>
|
|
48
48
|
<meta name="twitter:image" content="https://egeominotti.github.io/bunqueue-dashboard/og.png" />
|
|
49
|
-
<script type="module" crossorigin src="/assets/index-
|
|
49
|
+
<script type="module" crossorigin src="/assets/index-Dr__4DsT.js"></script>
|
|
50
50
|
<link rel="modulepreload" crossorigin href="/assets/cn-CMFYpumL.js">
|
|
51
51
|
<link rel="modulepreload" crossorigin href="/assets/react-vendor-Bjui4wS4.js">
|
|
52
52
|
<link rel="modulepreload" crossorigin href="/assets/connectionStore-Cd9-3Fw0.js">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bunqueue-dashboard",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.34",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Web dashboard for a bunqueue server (queues, jobs, DLQ, cron, metrics, workers, live activity). Run with `bunx bunqueue-dashboard` (requires Bun).",
|
|
6
6
|
"bin": {
|
package/scripts/embedded.gen.ts
CHANGED
|
@@ -4,134 +4,134 @@ import f0 from "../dist/og.png" with { type: 'file' };
|
|
|
4
4
|
import f1 from "../dist/.vite/manifest.json" with { type: 'file' };
|
|
5
5
|
import f2 from "../dist/index.html" with { type: 'file' };
|
|
6
6
|
import f3 from "../dist/favicon.svg" with { type: 'file' };
|
|
7
|
-
import f4 from "../dist/assets/
|
|
8
|
-
import f5 from "../dist/assets/
|
|
9
|
-
import f6 from "../dist/assets/
|
|
10
|
-
import f7 from "../dist/assets/
|
|
11
|
-
import f8 from "../dist/assets/
|
|
12
|
-
import f9 from "../dist/assets/
|
|
13
|
-
import f10 from "../dist/assets/
|
|
14
|
-
import f11 from "../dist/assets/
|
|
15
|
-
import f12 from "../dist/assets/
|
|
16
|
-
import f13 from "../dist/assets/
|
|
17
|
-
import f14 from "../dist/assets/
|
|
18
|
-
import f15 from "../dist/assets/
|
|
19
|
-
import f16 from "../dist/assets/
|
|
20
|
-
import f17 from "../dist/assets/
|
|
21
|
-
import f18 from "../dist/assets/
|
|
22
|
-
import f19 from "../dist/assets/
|
|
23
|
-
import f20 from "../dist/assets/
|
|
24
|
-
import f21 from "../dist/assets/
|
|
25
|
-
import f22 from "../dist/assets/
|
|
26
|
-
import f23 from "../dist/assets/
|
|
27
|
-
import f24 from "../dist/assets/
|
|
28
|
-
import f25 from "../dist/assets/
|
|
29
|
-
import f26 from "../dist/assets/
|
|
30
|
-
import f27 from "../dist/assets/
|
|
31
|
-
import f28 from "../dist/assets/
|
|
32
|
-
import f29 from "../dist/assets/
|
|
33
|
-
import f30 from "../dist/assets/
|
|
34
|
-
import f31 from "../dist/assets/
|
|
35
|
-
import f32 from "../dist/assets/
|
|
36
|
-
import f33 from "../dist/assets/
|
|
37
|
-
import f34 from "../dist/assets/
|
|
38
|
-
import f35 from "../dist/assets/
|
|
39
|
-
import f36 from "../dist/assets/
|
|
40
|
-
import f37 from "../dist/assets/
|
|
41
|
-
import f38 from "../dist/assets/
|
|
42
|
-
import f39 from "../dist/assets/
|
|
43
|
-
import f40 from "../dist/assets/
|
|
44
|
-
import f41 from "../dist/assets/
|
|
45
|
-
import f42 from "../dist/assets/
|
|
46
|
-
import f43 from "../dist/assets/
|
|
47
|
-
import f44 from "../dist/assets/
|
|
48
|
-
import f45 from "../dist/assets/
|
|
49
|
-
import f46 from "../dist/assets/
|
|
50
|
-
import f47 from "../dist/assets/
|
|
51
|
-
import f48 from "../dist/assets/
|
|
52
|
-
import f49 from "../dist/assets/
|
|
53
|
-
import f50 from "../dist/assets/
|
|
54
|
-
import f51 from "../dist/assets/
|
|
55
|
-
import f52 from "../dist/assets/
|
|
56
|
-
import f53 from "../dist/assets/
|
|
57
|
-
import f54 from "../dist/assets/
|
|
58
|
-
import f55 from "../dist/assets/
|
|
59
|
-
import f56 from "../dist/assets/
|
|
60
|
-
import f57 from "../dist/assets/
|
|
61
|
-
import f58 from "../dist/assets/
|
|
7
|
+
import f4 from "../dist/assets/index-Dr__4DsT.js" with { type: 'file' };
|
|
8
|
+
import f5 from "../dist/assets/Metrics-CSPpBf1m.js" with { type: 'file' };
|
|
9
|
+
import f6 from "../dist/assets/Workers-lP1BXHFq.js" with { type: 'file' };
|
|
10
|
+
import f7 from "../dist/assets/Database-CXPb3XGr.js" with { type: 'file' };
|
|
11
|
+
import f8 from "../dist/assets/react-vendor-Bjui4wS4.js" with { type: 'file' };
|
|
12
|
+
import f9 from "../dist/assets/UsagePro-CD7dgt3d.js" with { type: 'file' };
|
|
13
|
+
import f10 from "../dist/assets/Benchmark-X_gdZun5.js" with { type: 'file' };
|
|
14
|
+
import f11 from "../dist/assets/Usage-DECeEsO2.js" with { type: 'file' };
|
|
15
|
+
import f12 from "../dist/assets/QueueDetail-NMfKwj6E.js" with { type: 'file' };
|
|
16
|
+
import f13 from "../dist/assets/useThroughputSeries-Bpyg6Jaq.js" with { type: 'file' };
|
|
17
|
+
import f14 from "../dist/assets/dist-DjvZiKhB.js" with { type: 'file' };
|
|
18
|
+
import f15 from "../dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2" with { type: 'file' };
|
|
19
|
+
import f16 from "../dist/assets/upstreamPaths-nG8N1XAz.js" with { type: 'file' };
|
|
20
|
+
import f17 from "../dist/assets/CronManager-BeYrLK2E.js" with { type: 'file' };
|
|
21
|
+
import f18 from "../dist/assets/Flows-CGmyghKF.js" with { type: 'file' };
|
|
22
|
+
import f19 from "../dist/assets/Diagnostics-DDtoiDYT.js" with { type: 'file' };
|
|
23
|
+
import f20 from "../dist/assets/S3BackupPro-BP1Ch54R.js" with { type: 'file' };
|
|
24
|
+
import f21 from "../dist/assets/LogsPro-BTQhvPKj.js" with { type: 'file' };
|
|
25
|
+
import f22 from "../dist/assets/BulkAddJobs-CXTpYMZf.js" with { type: 'file' };
|
|
26
|
+
import f23 from "../dist/assets/AreaChart-REK4ZsTC.js" with { type: 'file' };
|
|
27
|
+
import f24 from "../dist/assets/Alerts-Dp4Vclez.js" with { type: 'file' };
|
|
28
|
+
import f25 from "../dist/assets/DlqPro-HSffdtLJ.js" with { type: 'file' };
|
|
29
|
+
import f26 from "../dist/assets/JobInspector-B9i1HnG5.js" with { type: 'file' };
|
|
30
|
+
import f27 from "../dist/assets/exportFile-C7xhE8Yh.js" with { type: 'file' };
|
|
31
|
+
import f28 from "../dist/assets/dist-DZL8soAh.js" with { type: 'file' };
|
|
32
|
+
import f29 from "../dist/assets/JobsPro-tmEN8f-P.js" with { type: 'file' };
|
|
33
|
+
import f30 from "../dist/assets/cn-CMFYpumL.js" with { type: 'file' };
|
|
34
|
+
import f31 from "../dist/assets/form-DsUq0w8s.js" with { type: 'file' };
|
|
35
|
+
import f32 from "../dist/assets/Settings-DjP28c_5.js" with { type: 'file' };
|
|
36
|
+
import f33 from "../dist/assets/AddJob-Cih9F84t.js" with { type: 'file' };
|
|
37
|
+
import f34 from "../dist/assets/install-DPCcfOYo.js" with { type: 'file' };
|
|
38
|
+
import f35 from "../dist/assets/useServerActionGuard-CItj3hvh.js" with { type: 'file' };
|
|
39
|
+
import f36 from "../dist/assets/QueueControl-DwYNcMfI.js" with { type: 'file' };
|
|
40
|
+
import f37 from "../dist/assets/Jobs-BZGtMnJI.js" with { type: 'file' };
|
|
41
|
+
import f38 from "../dist/assets/dist-DpZcbP9W.js" with { type: 'file' };
|
|
42
|
+
import f39 from "../dist/assets/McpServer-D5rwBg74.js" with { type: 'file' };
|
|
43
|
+
import f40 from "../dist/assets/Queues-BeTAi8V8.js" with { type: 'file' };
|
|
44
|
+
import f41 from "../dist/assets/dist-BlWBaCN6.js" with { type: 'file' };
|
|
45
|
+
import f42 from "../dist/assets/index-BWoUj86M.css" with { type: 'file' };
|
|
46
|
+
import f43 from "../dist/assets/Cron-DUHkse77.js" with { type: 'file' };
|
|
47
|
+
import f44 from "../dist/assets/jobActions-LQD4KfCc.js" with { type: 'file' };
|
|
48
|
+
import f45 from "../dist/assets/Webhooks-Ct-x8DD1.js" with { type: 'file' };
|
|
49
|
+
import f46 from "../dist/assets/CopilotPanel-CIXpcwkH.js" with { type: 'file' };
|
|
50
|
+
import f47 from "../dist/assets/DlqControl-CazFmSEd.js" with { type: 'file' };
|
|
51
|
+
import f48 from "../dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2" with { type: 'file' };
|
|
52
|
+
import f49 from "../dist/assets/Overview-StvHYRZ5.js" with { type: 'file' };
|
|
53
|
+
import f50 from "../dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2" with { type: 'file' };
|
|
54
|
+
import f51 from "../dist/assets/S3Backup-BYkAtONl.js" with { type: 'file' };
|
|
55
|
+
import f52 from "../dist/assets/dist-1f1fMHVO.js" with { type: 'file' };
|
|
56
|
+
import f53 from "../dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2" with { type: 'file' };
|
|
57
|
+
import f54 from "../dist/assets/Logs-DxUD9V2A.js" with { type: 'file' };
|
|
58
|
+
import f55 from "../dist/assets/WorkersPro-CAUqy3Cp.js" with { type: 'file' };
|
|
59
|
+
import f56 from "../dist/assets/QueueActions-CibRLzrz.js" with { type: 'file' };
|
|
60
|
+
import f57 from "../dist/assets/MetricsPro-DSn-3qNT.js" with { type: 'file' };
|
|
61
|
+
import f58 from "../dist/assets/Dlq-CX_uRblW.js" with { type: 'file' };
|
|
62
62
|
import f59 from "../dist/assets/flowMutationSafety-DVD1IMr-.js" with { type: 'file' };
|
|
63
63
|
import f60 from "../dist/assets/promisePool-BVfQ9n9Q.js" with { type: 'file' };
|
|
64
|
-
import f61 from "../dist/assets/
|
|
65
|
-
import f62 from "../dist/assets/
|
|
66
|
-
import f63 from "../dist/assets/
|
|
67
|
-
import f64 from "../dist/assets/
|
|
68
|
-
import f65 from "../dist/assets/
|
|
64
|
+
import f61 from "../dist/assets/QueuesOverview-BfQO8NS4.js" with { type: 'file' };
|
|
65
|
+
import f62 from "../dist/assets/Pagination-eotgGQf9.js" with { type: 'file' };
|
|
66
|
+
import f63 from "../dist/assets/connectionStore-Cd9-3Fw0.js" with { type: 'file' };
|
|
67
|
+
import f64 from "../dist/assets/QueueDetailPro-C8SBjX09.js" with { type: 'file' };
|
|
68
|
+
import f65 from "../dist/assets/ServerControl-C85jYgyN.js" with { type: 'file' };
|
|
69
69
|
|
|
70
70
|
export const ASSETS: Record<string, string> = {
|
|
71
71
|
"/og.png": f0,
|
|
72
72
|
"/.vite/manifest.json": f1,
|
|
73
73
|
"/index.html": f2,
|
|
74
74
|
"/favicon.svg": f3,
|
|
75
|
-
"/assets/
|
|
76
|
-
"/assets/
|
|
77
|
-
"/assets/
|
|
78
|
-
"/assets/
|
|
79
|
-
"/assets/
|
|
80
|
-
"/assets/
|
|
81
|
-
"/assets/
|
|
82
|
-
"/assets/
|
|
83
|
-
"/assets/
|
|
84
|
-
"/assets/
|
|
85
|
-
"/assets/
|
|
86
|
-
"/assets/
|
|
87
|
-
"/assets/
|
|
88
|
-
"/assets/
|
|
89
|
-
"/assets/
|
|
90
|
-
"/assets/
|
|
91
|
-
"/assets/
|
|
92
|
-
"/assets/
|
|
93
|
-
"/assets/
|
|
94
|
-
"/assets/
|
|
95
|
-
"/assets/
|
|
96
|
-
"/assets/
|
|
97
|
-
"/assets/
|
|
98
|
-
"/assets/
|
|
99
|
-
"/assets/
|
|
100
|
-
"/assets/
|
|
101
|
-
"/assets/
|
|
102
|
-
"/assets/
|
|
103
|
-
"/assets/
|
|
104
|
-
"/assets/
|
|
105
|
-
"/assets/
|
|
106
|
-
"/assets/
|
|
107
|
-
"/assets/
|
|
108
|
-
"/assets/
|
|
109
|
-
"/assets/
|
|
110
|
-
"/assets/
|
|
111
|
-
"/assets/
|
|
112
|
-
"/assets/
|
|
113
|
-
"/assets/
|
|
114
|
-
"/assets/
|
|
115
|
-
"/assets/
|
|
116
|
-
"/assets/
|
|
117
|
-
"/assets/
|
|
118
|
-
"/assets/
|
|
119
|
-
"/assets/
|
|
120
|
-
"/assets/
|
|
121
|
-
"/assets/
|
|
122
|
-
"/assets/
|
|
123
|
-
"/assets/
|
|
124
|
-
"/assets/
|
|
125
|
-
"/assets/
|
|
126
|
-
"/assets/
|
|
127
|
-
"/assets/
|
|
128
|
-
"/assets/
|
|
129
|
-
"/assets/
|
|
75
|
+
"/assets/index-Dr__4DsT.js": f4,
|
|
76
|
+
"/assets/Metrics-CSPpBf1m.js": f5,
|
|
77
|
+
"/assets/Workers-lP1BXHFq.js": f6,
|
|
78
|
+
"/assets/Database-CXPb3XGr.js": f7,
|
|
79
|
+
"/assets/react-vendor-Bjui4wS4.js": f8,
|
|
80
|
+
"/assets/UsagePro-CD7dgt3d.js": f9,
|
|
81
|
+
"/assets/Benchmark-X_gdZun5.js": f10,
|
|
82
|
+
"/assets/Usage-DECeEsO2.js": f11,
|
|
83
|
+
"/assets/QueueDetail-NMfKwj6E.js": f12,
|
|
84
|
+
"/assets/useThroughputSeries-Bpyg6Jaq.js": f13,
|
|
85
|
+
"/assets/dist-DjvZiKhB.js": f14,
|
|
86
|
+
"/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2": f15,
|
|
87
|
+
"/assets/upstreamPaths-nG8N1XAz.js": f16,
|
|
88
|
+
"/assets/CronManager-BeYrLK2E.js": f17,
|
|
89
|
+
"/assets/Flows-CGmyghKF.js": f18,
|
|
90
|
+
"/assets/Diagnostics-DDtoiDYT.js": f19,
|
|
91
|
+
"/assets/S3BackupPro-BP1Ch54R.js": f20,
|
|
92
|
+
"/assets/LogsPro-BTQhvPKj.js": f21,
|
|
93
|
+
"/assets/BulkAddJobs-CXTpYMZf.js": f22,
|
|
94
|
+
"/assets/AreaChart-REK4ZsTC.js": f23,
|
|
95
|
+
"/assets/Alerts-Dp4Vclez.js": f24,
|
|
96
|
+
"/assets/DlqPro-HSffdtLJ.js": f25,
|
|
97
|
+
"/assets/JobInspector-B9i1HnG5.js": f26,
|
|
98
|
+
"/assets/exportFile-C7xhE8Yh.js": f27,
|
|
99
|
+
"/assets/dist-DZL8soAh.js": f28,
|
|
100
|
+
"/assets/JobsPro-tmEN8f-P.js": f29,
|
|
101
|
+
"/assets/cn-CMFYpumL.js": f30,
|
|
102
|
+
"/assets/form-DsUq0w8s.js": f31,
|
|
103
|
+
"/assets/Settings-DjP28c_5.js": f32,
|
|
104
|
+
"/assets/AddJob-Cih9F84t.js": f33,
|
|
105
|
+
"/assets/install-DPCcfOYo.js": f34,
|
|
106
|
+
"/assets/useServerActionGuard-CItj3hvh.js": f35,
|
|
107
|
+
"/assets/QueueControl-DwYNcMfI.js": f36,
|
|
108
|
+
"/assets/Jobs-BZGtMnJI.js": f37,
|
|
109
|
+
"/assets/dist-DpZcbP9W.js": f38,
|
|
110
|
+
"/assets/McpServer-D5rwBg74.js": f39,
|
|
111
|
+
"/assets/Queues-BeTAi8V8.js": f40,
|
|
112
|
+
"/assets/dist-BlWBaCN6.js": f41,
|
|
113
|
+
"/assets/index-BWoUj86M.css": f42,
|
|
114
|
+
"/assets/Cron-DUHkse77.js": f43,
|
|
115
|
+
"/assets/jobActions-LQD4KfCc.js": f44,
|
|
116
|
+
"/assets/Webhooks-Ct-x8DD1.js": f45,
|
|
117
|
+
"/assets/CopilotPanel-CIXpcwkH.js": f46,
|
|
118
|
+
"/assets/DlqControl-CazFmSEd.js": f47,
|
|
119
|
+
"/assets/inter-latin-wght-normal-Dx4kXJAl.woff2": f48,
|
|
120
|
+
"/assets/Overview-StvHYRZ5.js": f49,
|
|
121
|
+
"/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2": f50,
|
|
122
|
+
"/assets/S3Backup-BYkAtONl.js": f51,
|
|
123
|
+
"/assets/dist-1f1fMHVO.js": f52,
|
|
124
|
+
"/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2": f53,
|
|
125
|
+
"/assets/Logs-DxUD9V2A.js": f54,
|
|
126
|
+
"/assets/WorkersPro-CAUqy3Cp.js": f55,
|
|
127
|
+
"/assets/QueueActions-CibRLzrz.js": f56,
|
|
128
|
+
"/assets/MetricsPro-DSn-3qNT.js": f57,
|
|
129
|
+
"/assets/Dlq-CX_uRblW.js": f58,
|
|
130
130
|
"/assets/flowMutationSafety-DVD1IMr-.js": f59,
|
|
131
131
|
"/assets/promisePool-BVfQ9n9Q.js": f60,
|
|
132
|
-
"/assets/
|
|
133
|
-
"/assets/
|
|
134
|
-
"/assets/
|
|
135
|
-
"/assets/
|
|
136
|
-
"/assets/
|
|
132
|
+
"/assets/QueuesOverview-BfQO8NS4.js": f61,
|
|
133
|
+
"/assets/Pagination-eotgGQf9.js": f62,
|
|
134
|
+
"/assets/connectionStore-Cd9-3Fw0.js": f63,
|
|
135
|
+
"/assets/QueueDetailPro-C8SBjX09.js": f64,
|
|
136
|
+
"/assets/ServerControl-C85jYgyN.js": f65,
|
|
137
137
|
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var e={health:{ok:!0,status:`healthy`,uptime:133,version:`2.8.55`,queues:{waiting:13,active:2,delayed:6,completed:4,dlq:2},connections:{tcp:0,ws:0,sse:0},memory:{heapUsed:3,heapTotal:4,rss:68}},ping:{ok:!0,data:{pong:!0,time:1783035131368}},stats:{ok:!0,stats:{waiting:13,prioritized:7,delayed:6,active:2,dlq:2,completed:4,"waiting-children":0,totalPushed:34,totalPulled:8,totalCompleted:4,totalFailed:0,uptime:133882,cronJobs:2,cronPending:2,pushPerSec:.25,pullPerSec:.06,completePerSec:.03,failPerSec:0},memory:{heapUsed:3,heapTotal:4,rss:69,external:1,arrayBuffers:0},collections:{jobIndex:34,completedJobs:4,jobResults:0,jobLogs:0,customIdMap:0,jobLocks:0,clientJobs:0,clientJobsTotal:0,pendingDepChecks:0,stalledCandidates:0,processingTotal:2,queuedTotal:26,waitingDepsTotal:0,temporalIndexTotal:34,delayedHeapTotal:6}},storage:{ok:!0,data:{diskFull:!1,error:null,since:null}},dashboard:{ok:!0,stats:{waiting:13,active:2,delayed:6,completed:4,dlq:2,totalPushed:34,totalPulled:8,totalCompleted:4,totalFailed:0,uptime:133882},throughput:{pushPerSec:.25,pullPerSec:.06,completePerSec:.03,failPerSec:0},latency:{averages:{pushMs:.07645341176470588,pullMs:.3890205,ackMs:1.03645825},percentiles:{push:{p50:.1,p95:.5,p99:1},pull:{p50:.1,p95:1,p99:1},ack:{p50:2.5,p95:2.5,p99:2.5}}},memory:{heapUsed:3,heapTotal:4,rss:70},collections:{jobIndex:34,completedJobs:4,jobResults:0,jobLogs:0,customIdMap:0,jobLocks:0,clientJobs:0,clientJobsTotal:0,pendingDepChecks:0,stalledCandidates:0,processingTotal:2,queuedTotal:26,waitingDepsTotal:0,temporalIndexTotal:34,delayedHeapTotal:6},workers:{total:0,active:0,list:[],truncated:!1},crons:{total:2,list:[{name:`nightly-report`,queue:`reports`,schedule:`0 2 * * *`,repeatEvery:null,nextRun:17830368e5,executions:0},{name:`heartbeat`,queue:`notifications`,schedule:null,repeatEvery:6e4,nextRun:1783035191362,executions:0}],truncated:!1},storage:{diskFull:!1,error:null,since:null},timestamp:1783035131369},dashboardQueues:{ok:!0,queues:[{name:`emails`,waiting:2,delayed:0,active:0,dlq:2,paused:!1},{name:`image-processing`,waiting:7,delayed:0,active:2,dlq:0,paused:!1},{name:`reports`,waiting:0,delayed:6,active:0,dlq:0,paused:!1},{name:`notifications`,waiting:4,delayed:0,active:0,dlq:0,paused:!1}],total:4,limit:100,offset:0,timestamp:1783035131370},queuesSummary:[{name:`emails`,paused:!1,counts:{waiting:2,active:0,completed:4,failed:2,delayed:0}},{name:`image-processing`,paused:!1,counts:{waiting:7,active:2,completed:0,failed:0,delayed:0}},{name:`reports`,paused:!1,counts:{waiting:0,active:0,completed:0,failed:0,delayed:6}},{name:`notifications`,paused:!1,counts:{waiting:4,active:0,completed:0,failed:0,delayed:0}}],crons:{ok:!0,crons:[{name:`nightly-report`,queue:`reports`,schedule:`0 2 * * *`,repeatEvery:null,nextRun:17830368e5,executions:0,maxLimit:null,timezone:null},{name:`heartbeat`,queue:`notifications`,schedule:null,repeatEvery:6e4,nextRun:1783035191362,executions:0,maxLimit:null,timezone:null}]},webhooks:{ok:!0,data:{webhooks:[{id:`019f252c-f5e3-7000-883c-28cc5dc157a0`,url:`https://hooks.example.com/bunqueue`,events:[`job.completed`,`job.failed`],queue:null,createdAt:1783035131363,lastTriggered:178303512e4,successCount:42,failureCount:3,enabled:!0}],stats:{total:1,enabled:1}}},workers:{ok:!0,data:{workers:[],stats:{total:0,active:0,totalProcessed:0,totalFailed:0,activeJobs:0}}},dlqStats:{ok:!0,total:2,byQueue:{emails:2}},counts_emails:{ok:!0,counts:{waiting:2,prioritized:7,delayed:0,active:0,completed:4,failed:2,"waiting-children":0,paused:0}},dlq_emails:{ok:!0,entries:[{job:{id:`019f252b-8716-7000-bbec-d8c65e09f340`,queue:`emails`,data:{to:`user8@example.com`,subject:`Welcome 8`},createdAt:1783035037462,runAt:1783035037462,startedAt:1783035131364,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:3,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037462},{state:`active`,timestamp:1783035131364}]},enteredAt:1783035131367,reason:`timeout`,error:`Job exceeded its 30000 ms timeout while connecting to smtp.example.com`,attempts:[{attempt:0,startedAt:1783035131364,failedAt:1783035131367,reason:`timeout`,error:`Job exceeded its 30000 ms timeout while connecting to smtp.example.com`,duration:3}],retryCount:0,lastRetryAt:null,nextRetryAt:null,expiresAt:1783639931367},{job:{id:`019f252b-8750-7000-afa1-767720d8f433`,queue:`emails`,data:{to:`user13@example.com`,subject:`Welcome 13`},createdAt:1783035037520,runAt:1783035037520,startedAt:1783035131364,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:3,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037520},{state:`active`,timestamp:1783035131364}]},enteredAt:1783035131368,reason:`max_attempts`,error:`SMTP 550: mailbox unavailable (user13@example.com) — 3 of 3 attempts failed`,attempts:[{attempt:0,startedAt:1783035131364,failedAt:1783035131368,reason:`max_attempts`,error:`SMTP 550: mailbox unavailable (user13@example.com) — 3 of 3 attempts failed`,duration:4}],retryCount:0,lastRetryAt:null,nextRetryAt:null,expiresAt:1783639931368}],total:2},detail_emails:{ok:!0,name:`emails`,counts:{waiting:2,prioritized:7,delayed:0,active:0,completed:4,failed:2,"waiting-children":0,totalCompleted:4,totalFailed:0,paused:0},paused:!1,priorityCounts:{0:2,1:3,2:4},dlqPreview:[{id:`019f252b-8716-7000-bbec-d8c65e09f340`,data:{to:`user8@example.com`,subject:`Welcome 8`},attempts:0,createdAt:1783035037462},{id:`019f252b-8750-7000-afa1-767720d8f433`,data:{to:`user13@example.com`,subject:`Welcome 13`},attempts:0,createdAt:1783035037520}],timestamp:1783035131373,jobs:{waiting:[{id:`019f252b-86f2-7000-a45d-6e5e3dd4abf0`,priority:0,createdAt:1783035037426,runAt:1783035037426,attempts:0,progress:0},{id:`019f252b-872e-7000-91af-f820da905a23`,priority:0,createdAt:1783035037486,runAt:1783035037486,attempts:0,progress:0}],active:[],delayed:[],paused:[]}},"counts_image-processing":{ok:!0,counts:{waiting:7,prioritized:0,delayed:0,active:2,completed:0,failed:0,"waiting-children":0,paused:0}},"dlq_image-processing":{ok:!0,entries:[],total:0},"detail_image-processing":{ok:!0,name:`image-processing`,counts:{waiting:7,prioritized:0,delayed:0,active:2,completed:0,failed:0,"waiting-children":0,totalCompleted:0,totalFailed:0,paused:0},paused:!1,priorityCounts:{0:7},dlqPreview:[],timestamp:1783035131374,jobs:{waiting:[{id:`019f252b-8780-7000-9066-7f3a95bbb309`,priority:0,createdAt:1783035037568,runAt:1783035037568,attempts:0,progress:0},{id:`019f252b-878d-7000-9396-88a9de934b0c`,priority:0,createdAt:1783035037581,runAt:1783035037581,attempts:0,progress:0},{id:`019f252b-8799-7000-8433-2f4d874dfa3f`,priority:0,createdAt:1783035037593,runAt:1783035037593,attempts:0,progress:0},{id:`019f252b-87a5-7000-b3d2-48c6816be571`,priority:0,createdAt:1783035037605,runAt:1783035037605,attempts:0,progress:0}],active:[{id:`019f252b-8769-7000-bc44-cfc168232f53`,priority:0,createdAt:1783035037545,runAt:1783035037545,attempts:0,progress:0},{id:`019f252b-8775-7000-884a-63456175f48c`,priority:0,createdAt:1783035037557,runAt:1783035037557,attempts:0,progress:0}],delayed:[],paused:[]}},counts_reports:{ok:!0,counts:{waiting:0,prioritized:0,delayed:6,active:0,completed:0,failed:0,"waiting-children":0,paused:0}},dlq_reports:{ok:!0,entries:[],total:0},detail_reports:{ok:!0,name:`reports`,counts:{waiting:0,prioritized:0,delayed:6,active:0,completed:0,failed:0,"waiting-children":0,totalCompleted:0,totalFailed:0,paused:0},paused:!1,priorityCounts:{0:6},dlqPreview:[],timestamp:1783035131374,jobs:{waiting:[],active:[],delayed:[{id:`019f252b-87d8-7000-8f0c-e8ca5fec7d18`,priority:0,createdAt:1783035037656,runAt:1783035637656,attempts:0,progress:0},{id:`019f252b-87e3-7000-b0dc-18aac125e1ce`,priority:0,createdAt:1783035037667,runAt:1783035637667,attempts:0,progress:0},{id:`019f252b-87ee-7000-bb98-e9997d218441`,priority:0,createdAt:1783035037678,runAt:1783035637678,attempts:0,progress:0},{id:`019f252b-87fa-7000-9eb8-5b7a6d7aa7b4`,priority:0,createdAt:1783035037690,runAt:1783035637690,attempts:0,progress:0}],paused:[]}},counts_notifications:{ok:!0,counts:{waiting:4,prioritized:0,delayed:0,active:0,completed:0,failed:0,"waiting-children":0,paused:0}},dlq_notifications:{ok:!0,entries:[],total:0},detail_notifications:{ok:!0,name:`notifications`,counts:{waiting:4,prioritized:0,delayed:0,active:0,completed:0,failed:0,"waiting-children":0,totalCompleted:0,totalFailed:0,paused:0},paused:!1,priorityCounts:{0:4},dlqPreview:[],timestamp:1783035131375,jobs:{waiting:[{id:`019f252b-8823-7000-9455-de9cff6a56e2`,priority:0,createdAt:1783035037731,runAt:1783035037731,attempts:0,progress:0},{id:`019f252b-882e-7000-ae38-9c7fe01639d5`,priority:0,createdAt:1783035037742,runAt:1783035037742,attempts:0,progress:0},{id:`019f252b-883b-7000-8789-839b741a1011`,priority:0,createdAt:1783035037755,runAt:1783035037755,attempts:0,progress:0},{id:`019f252b-884d-7000-b703-96a357151ef4`,priority:0,createdAt:1783035037773,runAt:1783035037773,attempts:0,progress:0}],active:[],delayed:[],paused:[]}},emailsWaiting:{ok:!0,jobs:[{id:`019f252b-86c0-7000-a54e-3816c968ebf0`,queue:`emails`,data:{to:`user1@example.com`,subject:`Welcome 1`},createdAt:1783035037376,runAt:1783035037376,startedAt:null,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035037376,stallCount:0,priority:1,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037376}],_state:`prioritized`,state:`prioritized`},{id:`019f252b-86ce-7000-adfc-613a9495a6ef`,queue:`emails`,data:{to:`user2@example.com`,subject:`Welcome 2`},createdAt:1783035037390,runAt:1783035037390,startedAt:null,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035037390,stallCount:0,priority:2,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037390}],_state:`prioritized`,state:`prioritized`},{id:`019f252b-86fe-7000-894d-fe3ad935cc36`,queue:`emails`,data:{to:`user6@example.com`,subject:`Welcome 6`},createdAt:1783035037438,runAt:1783035037438,startedAt:null,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035037438,stallCount:0,priority:1,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037438}],_state:`prioritized`,state:`prioritized`},{id:`019f252b-870a-7000-91d2-ca4070505abe`,queue:`emails`,data:{to:`user7@example.com`,subject:`Welcome 7`},createdAt:1783035037450,runAt:1783035037450,startedAt:null,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035037450,stallCount:0,priority:2,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037450}],_state:`prioritized`,state:`prioritized`}]},emailsCompleted:{ok:!0,jobs:[{id:`019f252b-86da-7000-a9e3-6b1b74944d70`,queue:`emails`,data:{to:`user3@example.com`,subject:`Welcome 3`},createdAt:1783035037402,runAt:1783035037402,startedAt:1783035131364,completedAt:1783035131367,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:3,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037402},{state:`active`,timestamp:1783035131364},{state:`completed`,timestamp:1783035131367}],_state:`completed`,state:`completed`},{id:`019f252b-86e6-7000-a51e-e65a7cd2ce85`,queue:`emails`,data:{to:`user4@example.com`,subject:`Welcome 4`},createdAt:1783035037414,runAt:1783035037414,startedAt:1783035131364,completedAt:1783035131366,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:4,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037414},{state:`active`,timestamp:1783035131364},{state:`completed`,timestamp:1783035131366}],_state:`completed`,state:`completed`},{id:`019f252b-8722-7000-9270-14be63598def`,queue:`emails`,data:{to:`user9@example.com`,subject:`Welcome 9`},createdAt:1783035037474,runAt:1783035037474,startedAt:1783035131364,completedAt:1783035131366,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:4,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037474},{state:`active`,timestamp:1783035131364},{state:`completed`,timestamp:1783035131366}],_state:`completed`,state:`completed`},{id:`019f252b-875b-7000-8f4b-3d571d84663d`,queue:`emails`,data:{to:`user14@example.com`,subject:`Welcome 14`},createdAt:1783035037531,runAt:1783035037531,startedAt:1783035131364,completedAt:1783035131367,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:4,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037531},{state:`active`,timestamp:1783035131364},{state:`completed`,timestamp:1783035131367}],_state:`completed`,state:`completed`}]},oneJob:{ok:!0,job:{id:`019f252b-8716-7000-bbec-d8c65e09f340`,queue:`emails`,data:{to:`user8@example.com`,subject:`Welcome 8`},createdAt:1783035037462,runAt:1783035037462,startedAt:1783035131364,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:3,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037462},{state:`active`,timestamp:1783035131364}],state:`failed`}}},t={ok:!0,sqliteVersion:`3.45.1`,pageSize:4096,pageCount:640,journalMode:`wal`,freelistPages:8,tables:6,indexes:11,fileSize:2621440,walSize:49152},n={jobs:{columns:[`id`,`queue`,`state`,`priority`,`attempts`,`created_at`],types:{id:`TEXT`,queue:`TEXT`,state:`TEXT`,priority:`INTEGER`,attempts:`INTEGER`,created_at:`INTEGER`},rows:[[`019f252b-86c0-7000-a54e-3816c968ebf0`,`emails`,`prioritized`,1,0,1783035037376],[`019f252b-8769-7000-bc44-cfc168232f53`,`image-processing`,`active`,0,0,1783035037545],[`019f252b-86da-7000-a9e3-6b1b74944d70`,`emails`,`completed`,3,0,1783035037402],[`019f252b-8716-7000-bbec-d8c65e09f340`,`emails`,`failed`,3,0,1783035037462],[`019f252b-87d8-7000-8f0c-e8ca5fec7d18`,`reports`,`delayed`,0,0,1783035037656]]},queues:{columns:[`name`,`paused`,`concurrency`,`rate_limit`],types:{name:`TEXT`,paused:`INTEGER`,concurrency:`INTEGER`,rate_limit:`INTEGER`},rows:[[`emails`,0,10,0],[`image-processing`,0,4,100],[`reports`,0,2,0],[`notifications`,0,8,0]]},dlq:{columns:[`id`,`queue`,`reason`,`attempts`,`entered_at`],types:{id:`TEXT`,queue:`TEXT`,reason:`TEXT`,attempts:`INTEGER`,entered_at:`INTEGER`},rows:[[`019f252b-8716-7000-bbec-d8c65e09f340`,`emails`,`max attempts reached`,3,1783035037462],[`019f252b-8a02-7000-9b21-4c1f0b7e2a55`,`reports`,`handler threw`,5,1783035039101]]},crons:{columns:[`name`,`queue`,`pattern`,`tz`,`next_run`],types:{name:`TEXT`,queue:`TEXT`,pattern:`TEXT`,tz:`TEXT`,next_run:`INTEGER`},rows:[[`nightly-report`,`reports`,`0 2 * * *`,`UTC`,17830944e5],[`digest-email`,`emails`,`*/15 * * * *`,`UTC`,17830359e5]]},webhooks:{columns:[`id`,`url`,`events`,`active`,`failures`,`created_at`],types:{id:`TEXT`,url:`TEXT`,events:`TEXT`,active:`INTEGER`,failures:`INTEGER`,created_at:`INTEGER`},rows:[[`wh_9c31`,`https://hooks.example.com/bunqueue`,`job:completed,job:failed`,1,0,1783034e6]]},job_results:{columns:[`job_id`,`result`,`stored_at`],types:{job_id:`TEXT`,result:`TEXT`,stored_at:`INTEGER`},rows:[[`019f252b-86da-7000-a9e3-6b1b74944d70`,`{"messageId":"smtp-7712"}`,1783035037999],[`019f252b-8769-7000-bc44-cfc168232f53`,`{"bytes":184320}`,1783035038220],[`019f252b-87d8-7000-8f0c-e8ca5fec7d18`,`{"rows":128}`,1783035038511],[`019f252b-8a02-7000-9b21-4c1f0b7e2a55`,`{"error":"handler threw"}`,1783035039300],[`demo-csv-formula`,`=SUM(1,2)`,1783035039400]]}};function r(e){return Object.hasOwn(n,e)?n[e]:void 0}var i={ok:!0,tables:Object.entries(n).map(([e,t])=>({name:e,rows:t.rows.length,columns:t.columns.length}))};function a(e){let t=r(e),n=t?.columns??[`id`,`data`],i=t?.types??{};return{ok:!0,table:e,columns:n.map((e,t)=>({name:e,type:i[e]??`TEXT`,notNull:t===0,defaultValue:null,primaryKey:t===0})),indexes:[{name:`idx_${e}_${n[0]}`,unique:!0,columns:[n[0]]}],sql:`CREATE TABLE ${e} (${n.map(e=>`${e} ${i[e]??`TEXT`}`).join(`, `)})`,rowCount:t?.rows.length??0}}var o={"flow-order-9a3f":{id:`flow-order-9a3f`,queue:`orders`,data:{name:`process-order`,orderId:`demo-9a3f`,__childrenIds:[`flow-charge-1`,`flow-ship-2`,`flow-notify-3`]},state:`waiting-children`,priority:1,parentId:null,childrenIds:[`flow-charge-1`,`flow-ship-2`,`flow-notify-3`],dependsOn:[`flow-charge-1`,`flow-ship-2`,`flow-notify-3`]},"flow-charge-1":{id:`flow-charge-1`,queue:`payments`,data:{name:`charge-payment`,__parentId:`flow-order-9a3f`,__parentQueue:`orders`},state:`completed`,priority:2,parentId:`flow-order-9a3f`,childrenIds:[],dependsOn:[]},"flow-ship-2":{id:`flow-ship-2`,queue:`shipping`,data:{name:`ship-order`,__parentId:`flow-order-9a3f`,__parentQueue:`orders`,__childrenIds:[`flow-label-4`]},state:`waiting-children`,priority:1,parentId:`flow-order-9a3f`,childrenIds:[`flow-label-4`],dependsOn:[`flow-label-4`]},"flow-label-4":{id:`flow-label-4`,queue:`shipping`,data:{name:`create-label`,__parentId:`flow-ship-2`,__parentQueue:`shipping`},state:`waiting`,priority:0,parentId:`flow-ship-2`,childrenIds:[],dependsOn:[]},"flow-notify-3":{id:`flow-notify-3`,queue:`emails`,data:{name:`notify-customer`,__parentId:`flow-order-9a3f`,__parentQueue:`orders`},state:`delayed`,priority:0,parentId:`flow-order-9a3f`,childrenIds:[],dependsOn:[`flow-charge-1`]}},s=t=>e[t]?.jobs??[],c=e.oneJob.job,l=[...s(`emailsWaiting`),...s(`emailsCompleted`),...c?[c]:[]],u=[`emails`,`image-processing`,`reports`,`notifications`];function d(e,t,n){return t===`emails`?e:{...e,id:`${t}-${String(e.id).slice(-12)}-${n}`,queue:t}}function f(e){if(o[e])return o[e];let t=l.find(t=>t.id===e);if(t)return t;for(let t of u){let n=l.map((e,n)=>d(e,t,n)).find(t=>t.id===e);if(n)return n}return{...c??{queue:`emails`,state:`failed`},id:e,customId:e.startsWith(`demo-custom:`)?e.slice(12):null}}var p={command:`bunqueue start`,httpPort:6790,tcpPort:6791,dataPath:`./data/bunqueue.db`,extraEnv:{LOG_LEVEL:`info`}},m=()=>({status:`running`,pid:42317,startedAt:Date.now()-36e5,exitCode:null,healthy:!0,version:`2.8.55`,config:p,runningConfig:p,db:{path:p.dataPath,exists:!0,size:2621440,walSize:49152,shmSize:32768,totalSize:2703360,mtimeMs:Date.now()-12e3}}),h=()=>{let e=Date.now();return{ok:!0,data:{workers:[{id:`wrk-9f21c3d0`,name:`worker-emails-1`,queues:[`emails`,`notifications`],concurrency:10,hostname:`worker-01`,pid:3411,status:`active`,registeredAt:e-54e5,lastSeen:e-4e3,activeJobs:0,processedJobs:1284,failedJobs:6,currentJob:null,uptime:54e5},{id:`wrk-4b77aa19`,name:`worker-media-1`,queues:[`image-processing`],concurrency:4,hostname:`worker-02`,pid:3987,status:`active`,registeredAt:e-51e5,lastSeen:e-2e3,activeJobs:2,processedJobs:342,failedJobs:1,currentJob:`019f252b-8769-7000-bc44-cfc168232f53`,uptime:51e5},{id:`wrk-c05e881f`,name:`worker-batch-1`,queues:[`reports`],concurrency:2,hostname:`worker-02`,pid:4102,status:`stale`,registeredAt:e-9e6,lastSeen:e-12e5,activeJobs:0,processedJobs:57,failedJobs:0,currentJob:null,uptime:78e5}],stats:{total:3,active:2,totalProcessed:1683,totalFailed:7,activeJobs:2}}}},g=()=>{let e=Date.now(),t=(t,n,r,i)=>({seq:t,ts:e-n,stream:r,line:i});return{lines:[t(1,8e3,`sys`,`starting: bunqueue start`),t(2,7800,`stdout`,`bunqueue v2.8.55 — HTTP :6790, TCP :6791`),t(3,7600,`stdout`,`SQLite ready (WAL) at ./data/bunqueue.db`),t(4,5e3,`stdout`,`worker registered: image-processing`),t(5,1200,`stdout`,`health ok — 4 queues, 34 jobs`)]}},_=e=>e.replace(/[A-Z]/g,e=>e.toLowerCase());function v(e,t,n=!1){let i=r(e);if(n&&!i)throw Error(`No such table: ${e}`);let a=i?.columns??[`id`,`data`],o=i?.rows??[],s=new URLSearchParams(t);if(n){let e=new Set([`orderBy`,`dir`,`fcol`,`fop`,`fval`]);for(let t of s.keys()){if(!e.has(t))throw Error(`Unknown database export option: ${t}`);if(s.getAll(t).length!==1)throw Error(`Duplicate database export option: ${t}`)}}let c=s.get(`orderBy`);if(n&&c===``)throw Error(`Database export orderBy must not be empty`);let l=c||null,u=s.get(`dir`);if(n&&u!==null&&u!==`asc`&&u!==`desc`)throw Error(`Database export dir must be "asc" or "desc"`);let d=u===`desc`?`desc`:`asc`,f=s.get(`fcol`),p=s.get(`fop`),m=s.get(`fval`);if(n&&(f!==null||p!==null||m!==null)&&(!f||!m||p!==`contains`&&p!==`eq`&&p!==`ne`))throw Error(`Database export filter requires valid fcol, fop and fval values`);let h=f&&m?{column:f,op:p===`eq`?`eq`:p===`ne`?`ne`:`contains`,value:m}:null,g=h?a.indexOf(h.column):-1;if(h&&g<0&&n)throw Error(`No such column: ${h.column}`);let v=h&&g>=0?o.filter(e=>{let t=e[g];if(t==null)return!1;let n=String(t);return h.op===`eq`?n===h.value:h.op===`ne`?n!==h.value:_(n).includes(_(h.value))}):o,y=l?a.indexOf(l):-1;if(l&&y<0&&n)throw Error(`No such column: ${l}`);return{table:e,columns:a,rows:y>=0?[...v].sort((e,t)=>{let n=e[y],r=t[y],i=n==null?r==null?0:-1:r==null?1:n<r?-1:+(n>r);return d===`desc`?-i:i}):v,orderBy:y>=0?l:null,dir:d,filter:g>=0?h:null}}function y(e,t){let n=v(e,t),{columns:r,orderBy:i,dir:a,filter:o}=n,s=new URLSearchParams(t),c=(e,t)=>{let n=Number(e);return e!==null&&Number.isFinite(n)&&n>=0?n:t},l=c(s.get(`limit`),50),u=c(s.get(`offset`),0),d=n.rows.slice(u,u+(l>0?l:n.rows.length));return{ok:!0,table:e,columns:r,rows:d,rowids:d.map((e,t)=>u+t+1),truncatedCells:d.map(e=>e.map(()=>!1)),total:n.rows.length,limit:l,offset:u,orderBy:i,dir:a,filter:o}}var b=2e5,x=16*1024*1024,S=2e3,C=2e3;function w(e){let t,n=!1;if(e==null)t=``;else if(typeof e==`string`)t=new TextEncoder().encode(e).byteLength>S?`${[...e].slice(0,C).join(``)}…`:e,n=!0;else if(typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`)t=String(e);else if(e instanceof Uint8Array)t=`<blob ${e.byteLength} B>`,n=!0;else throw Error(`Database export produced an unsupported SQLite value`);let r=n&&/^[=+\-@\t\r]/.test(t)?`'${t}`:t;return/[",\r\n]/.test(r)?`"${r.replaceAll(`"`,`""`)}"`:r}function T(e,t){try{let n=v(e,t,!0),r=new TextEncoder,i=[],a=0,o=0,s=null,c=e=>{let t=r.encode(e);return a+t.byteLength>x?!1:(i.push(t),a+=t.byteLength,!0)};if(!c(n.columns.map(w).join(`,`)))throw Error(`Database export header exceeds the ${x}-byte export limit`);for(let e of n.rows){if(o>=b){s=`rows`;break}if(!c(`\r\n${e.map(w).join(`,`)}`)){s=`bytes`;break}o++}let l=new Uint8Array(a),u=0;for(let e of i)l.set(e,u),u+=e.byteLength;return new Response(l,{status:200,headers:{"Content-Type":`text/csv; charset=utf-8`,"Content-Length":String(a),"Cache-Control":`no-store`,"X-Content-Type-Options":`nosniff`,"X-Bunqueue-Db-Export-Version":`1`,"X-Bunqueue-Db-Export-Table":encodeURIComponent(n.table),"X-Bunqueue-Db-Export-Rows":String(o),"X-Bunqueue-Db-Export-Bytes":String(a),"X-Bunqueue-Db-Export-Cap":s??`none`,"Access-Control-Expose-Headers":`Content-Length, X-Bunqueue-Db-Export-Version, X-Bunqueue-Db-Export-Table, X-Bunqueue-Db-Export-Rows, X-Bunqueue-Db-Export-Bytes, X-Bunqueue-Db-Export-Cap`}})}catch(e){return new Response(JSON.stringify({ok:!1,error:e instanceof Error?e.message:String(e)}),{status:400,headers:{"Content-Type":`application/json`}})}}var E=new Set([`events`,`health`,`ping`,`stats`,`storage`,`dashboard`,`queues`,`jobs`,`crons`,`webhooks`,`workers`,`dlq`,`control`,`db`,`gc`,`heapstats`]);function D(n,r,o){let s=n.replace(/\/+$/,``)||`/`,c=s.split(`/`).filter(Boolean);if(c[0]===`control`)return c[1]===`logs`?g():c[1]===`config`?p:m();if(r!==`GET`)return s===`/gc`?{ok:!0,before:{heapUsed:118,heapTotal:176,rss:214},after:{heapUsed:94,heapTotal:150,rss:181}}:s.endsWith(`/db/query`)?{ok:!0,columns:[`note`],rows:[[`This is the demo. Queries run against a static in-memory sample.`]],rowCount:1,truncated:!1,ms:.4}:s.endsWith(`/jobs`)||s.endsWith(`/jobs/bulk`)?{ok:!0,id:`demo-${c.join(`-`)}`,ids:[`demo-1`]}:{ok:!0};if(s===`/workers`)return h();if(s===`/heapstats`)return{ok:!0,memory:{heapUsed:94,heapTotal:150,rss:181},heap:{objectCount:486204,protectedCount:1284,globalCount:312},collections:{},topObjectTypes:[{type:`Structure`,count:42118},{type:`Object`,count:31064},{type:`Function`,count:18902},{type:`string`,count:12447},{type:`Array`,count:8021}]};let u={"/health":`health`,"/ping":`ping`,"/stats":`stats`,"/storage":`storage`,"/dashboard":`dashboard`,"/dashboard/queues":`dashboardQueues`,"/queues/summary":`queuesSummary`,"/crons":`crons`,"/webhooks":`webhooks`,"/dlq/stats":`dlqStats`};if(u[s])return e[u[s]];if(c[0]===`dashboard`&&c[1]===`queues`&&c[2])return e[`detail_${c[2]}`]??e.detail_emails;if(c[0]===`queues`&&c[1]){let t=decodeURIComponent(c[1]);if(c[2]===`counts`)return e[`counts_${t}`]??{ok:!0,counts:{}};if(c[2]===`dlq`&&c[3]===`stats`)return{ok:!0,stats:t===`emails`?{total:2,byReason:{timeout:1,max_attempts:1}}:{total:0,byReason:{}}};if(c[2]===`dlq`)return e[`dlq_${t}`]??{ok:!0,entries:[],total:0};if(c[2]===`stall-config`)return{ok:!0,config:{enabled:!0,stallInterval:3e4,maxStalls:3,gracePeriod:5e3}};if(c[2]===`dlq-config`)return{ok:!0,config:{autoRetry:!1,autoRetryInterval:6e4,maxAutoRetries:3,maxAge:null,maxEntries:1e3}};if(c[2]===`jobs`&&c[3]===`list`){let e=new URLSearchParams(o),n=(e.get(`states`)??e.get(`state`)??``).split(`,`).map(e=>e.trim()).filter(Boolean),r=e=>n.length===0||n.includes(String(e))||n.includes(`waiting`)&&e===`prioritized`;return{ok:!0,jobs:l.filter(e=>r(e.state)).map((e,n)=>d(e,t,n))}}}if(c[0]===`jobs`&&c[1]){let e=decodeURIComponent(c[1]);if(c[1]===`custom`&&c[2])return{ok:!0,job:f(`demo-custom:${decodeURIComponent(c[2])}`)};if(c[2]===`result`)return{ok:!0,id:e,result:{sent:!0,provider:`demo`}};if(c[2]===`logs`){let e=[`[info] picked up by worker-emails-1`,`[info] connecting to smtp.example.com:587`,`[error] SMTP 550: mailbox unavailable — will retry with backoff`];return{ok:!0,data:{logs:e,count:e.length}}}if(!c[2])return{ok:!0,job:f(e)}}if(c[0]===`db`){if(c[1]===`info`)return t;if(c[1]===`tables`&&!c[2])return i;if(c[1]===`tables`&&c[2]){let e=decodeURIComponent(c[2]);return c[3]===`schema`?a(e):c[3]===`cell`?{ok:!0,value:`demo cell value`}:y(e,o)}}return{ok:!0}}var O=e=>new Response(JSON.stringify(e),{status:200,headers:{"Content-Type":`application/json`}});function k(e){let t=new TextEncoder,n=[`emails`,`image-processing`,`reports`,`notifications`],r=[`job:active`,`job:completed`,`job:completed`,`job:waiting`,`job:failed`,`job:active`],i=new ReadableStream({start(i){let a=0,o=!1,s,c=()=>{if(!o){o=!0,clearInterval(s);try{i.close()}catch{}}};i.enqueue(t.encode(`data: {"connected":true}
|
|
2
|
-
|
|
3
|
-
`)),s=setInterval(()=>{if(o)return;let e=r[a%r.length],s=n[a%n.length],l=JSON.stringify({queue:s,jobId:`demo-${a}`,name:s,timestamp:Date.now()});try{i.enqueue(t.encode(`event: ${e}\ndata: ${l}\n\n`))}catch{c()}a+=1},1400),e?.aborted?c():e?.addEventListener(`abort`,c,{once:!0})}});return new Response(i,{status:200,headers:{"Content-Type":`text/event-stream`}})}var A=!1;function j(){if(A||typeof window>`u`)return()=>void 0;A=!0;let e=window.fetch,t=e.bind(window),n=`/`.replace(/\/+$/,``),r=(e,r)=>{let i=e instanceof Request?e:null,a=typeof e==`string`?e:e instanceof URL?e.href:i?.url??``,o=(r?.method??i?.method??`GET`).toUpperCase(),s;try{s=new URL(a,window.location.origin)}catch{return t(e,r)}let c=s.pathname;n&&(c===n||c.startsWith(`${n}/`))&&(c=c.slice(n.length)||`/`),(c===`/api`||c.startsWith(`/api/`))&&(c=c.slice(4)||`/`);let l=c.split(`/`).filter(Boolean)[0];if(!l||!E.has(l))return t(e,r);if(l===`events`)return Promise.resolve(k(r?.signal??i?.signal));if(o===`GET`){let e=c.replace(/\/+$/,``).split(`/`).filter(Boolean);if(e.length===4&&e[0]===`db`&&e[1]===`tables`&&e[3]===`export`)return Promise.resolve(T(decodeURIComponent(e[2]),s.search))}return Promise.resolve(O(D(c,o,s.search)))};window.fetch=r;let i=!1;return()=>{i||(i=!0,window.fetch===r&&(window.fetch=e),A=!1)}}export{j as installDemo};
|