bullmq-dash 0.1.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 (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +219 -0
  3. package/dist/app.d.ts +17 -0
  4. package/dist/app.d.ts.map +1 -0
  5. package/dist/config.d.ts +45 -0
  6. package/dist/config.d.ts.map +1 -0
  7. package/dist/data/jobs.d.ts +48 -0
  8. package/dist/data/jobs.d.ts.map +1 -0
  9. package/dist/data/metrics.d.ts +26 -0
  10. package/dist/data/metrics.d.ts.map +1 -0
  11. package/dist/data/queues.d.ts +34 -0
  12. package/dist/data/queues.d.ts.map +1 -0
  13. package/dist/data/redis.d.ts +6 -0
  14. package/dist/data/redis.d.ts.map +1 -0
  15. package/dist/data/schedulers.d.ts +81 -0
  16. package/dist/data/schedulers.d.ts.map +1 -0
  17. package/dist/index.d.ts +2 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +2450 -0
  20. package/dist/index.js.map +32 -0
  21. package/dist/polling.d.ts +14 -0
  22. package/dist/polling.d.ts.map +1 -0
  23. package/dist/state.d.ts +73 -0
  24. package/dist/state.d.ts.map +1 -0
  25. package/dist/ui/colors.d.ts +26 -0
  26. package/dist/ui/colors.d.ts.map +1 -0
  27. package/dist/ui/confirm-dialog.d.ts +11 -0
  28. package/dist/ui/confirm-dialog.d.ts.map +1 -0
  29. package/dist/ui/global-metrics.d.ts +10 -0
  30. package/dist/ui/global-metrics.d.ts.map +1 -0
  31. package/dist/ui/job-detail.d.ts +14 -0
  32. package/dist/ui/job-detail.d.ts.map +1 -0
  33. package/dist/ui/job-list.d.ts +12 -0
  34. package/dist/ui/job-list.d.ts.map +1 -0
  35. package/dist/ui/layout.d.ts +16 -0
  36. package/dist/ui/layout.d.ts.map +1 -0
  37. package/dist/ui/page-jump.d.ts +13 -0
  38. package/dist/ui/page-jump.d.ts.map +1 -0
  39. package/dist/ui/queue-list.d.ts +11 -0
  40. package/dist/ui/queue-list.d.ts.map +1 -0
  41. package/dist/ui/queue-stats.d.ts +10 -0
  42. package/dist/ui/queue-stats.d.ts.map +1 -0
  43. package/dist/ui/scheduler-detail.d.ts +14 -0
  44. package/dist/ui/scheduler-detail.d.ts.map +1 -0
  45. package/dist/ui/scheduler-list.d.ts +14 -0
  46. package/dist/ui/scheduler-list.d.ts.map +1 -0
  47. package/dist/ui/status-filter.d.ts +10 -0
  48. package/dist/ui/status-filter.d.ts.map +1 -0
  49. package/dist/ui/utils.d.ts +7 -0
  50. package/dist/ui/utils.d.ts.map +1 -0
  51. package/package.json +59 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 quanghuynt14
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,219 @@
1
+ # BullMQ Dash
2
+
3
+ A modern terminal UI dashboard for monitoring [BullMQ](https://bullmq.io/) queues in real-time.
4
+
5
+ ![npm version](https://img.shields.io/npm/v/bullmq-dash)
6
+ ![license](https://img.shields.io/npm/l/bullmq-dash)
7
+
8
+ ## Features
9
+
10
+ - **Real-time monitoring** - Watch queues and jobs update live with configurable polling
11
+ - **Queue overview** - View all BullMQ queues with job counts and status
12
+ - **Job inspection** - Browse jobs by status, view details, data, and error stacktraces
13
+ - **Scheduler monitoring** - View Job Schedulers (repeatable jobs) with patterns, iterations, and job history
14
+ - **Job management** - Delete jobs directly from the TUI
15
+ - **Global metrics** - Track enqueue/dequeue rates across all queues
16
+ - **Modern UI** - Beautiful Catppuccin Mocha color theme
17
+ - **Keyboard-driven** - Full keyboard navigation for efficient workflow
18
+
19
+ ## Requirements
20
+
21
+ - [Bun](https://bun.sh/) >= 1.0.0 (required - Node.js is not supported due to OpenTUI's ESM import attributes)
22
+ - Redis server with BullMQ queues
23
+
24
+ ## Installation
25
+
26
+ ```bash
27
+ # Install globally via npm
28
+ npm install -g bullmq-dash
29
+
30
+ # Or use bunx/npx to run directly
31
+ bunx bullmq-dash
32
+ npx bullmq-dash
33
+ ```
34
+
35
+ ### From Source
36
+
37
+ ```bash
38
+ # Clone the repository
39
+ git clone https://github.com/quanghuynt14/bullmq-dash.git
40
+ cd bullmq-dash
41
+
42
+ # Install dependencies
43
+ bun install
44
+
45
+ # Build
46
+ bun run build
47
+ ```
48
+
49
+ ## Usage
50
+
51
+ ### Quick Start
52
+
53
+ ```bash
54
+ # If installed globally
55
+ bullmq-dash
56
+
57
+ # Or run from source
58
+ bun dist/index.js
59
+
60
+ # Or use the dev script
61
+ bun run dev
62
+ ```
63
+
64
+ ### Configuration
65
+
66
+ Create a `.env` file in the project root:
67
+
68
+ ```env
69
+ # Redis connection
70
+ REDIS_HOST=localhost
71
+ REDIS_PORT=6379
72
+ REDIS_PASSWORD=your_password # Optional
73
+ REDIS_DB=0 # Optional, default: 0
74
+
75
+ # Polling interval in milliseconds
76
+ POLL_INTERVAL=3000 # Optional, default: 3000
77
+
78
+ # Filter specific queues (comma-separated)
79
+ QUEUE_NAMES=queue1,queue2 # Optional, monitors all queues if not set
80
+ ```
81
+
82
+ ## Keyboard Shortcuts
83
+
84
+ ### Navigation
85
+
86
+ | Key | Action |
87
+ | --------- | ----------------------------------- |
88
+ | `j` / `↓` | Move down |
89
+ | `k` / `↑` | Move up |
90
+ | `Tab` | Switch between queues and jobs pane |
91
+ | `←` / `→` | Previous/next page (in job list) |
92
+
93
+ ### Actions
94
+
95
+ | Key | Action |
96
+ | -------------- | ------------------- |
97
+ | `Enter` | View job details |
98
+ | `d` | Delete selected job |
99
+ | `r` | Refresh data |
100
+ | `q` / `Ctrl+C` | Quit |
101
+
102
+ ### Job Status Filter
103
+
104
+ | Key | Status |
105
+ | --- | ------------ |
106
+ | `1` | Latest (all) |
107
+ | `2` | Waiting |
108
+ | `3` | Active |
109
+ | `4` | Completed |
110
+ | `5` | Failed |
111
+ | `6` | Delayed |
112
+ | `7` | Scheduled |
113
+
114
+ ### Scheduler View (Key `7`)
115
+
116
+ When viewing scheduled jobs, the job list shows all Job Schedulers (repeatable jobs):
117
+
118
+ | Key | Action |
119
+ | ------- | ----------------------------------------- |
120
+ | `Enter` | View scheduler details |
121
+ | `j` | Jump to next delayed job (in detail view) |
122
+
123
+ The scheduler detail modal shows:
124
+ - **Basic info**: Key, name, pattern/interval, timezone
125
+ - **Statistics**: Iterations count, limits, created/next/end dates
126
+ - **Job template**: Default job data and options
127
+ - **Next delayed job**: Preview of the next job to be executed
128
+ - **Recent history**: Last 10 completed/failed jobs from this scheduler
129
+
130
+ ## UI Overview
131
+
132
+ ```
133
+ ┌─────────────────────────────────────────────────────────────────┐
134
+ │ BullMQ Connected localhost:6379 │
135
+ ├─────────────────────────────────────────────────────────────────┤
136
+ │ QUEUES:3 WAIT:42 ACTIVE:5 DONE:1.2K FAIL:3 ENQ:120/m DEQ:115/m │
137
+ ├──────────────┬──────────────────────────────────────────────────┤
138
+ │ QUEUES │ JOBS │
139
+ │ │ Status: [1:latest] 2:wait 3:active ... │
140
+ │ > email │ │
141
+ │ payments │ job-123 send-email completed 2m ago │
142
+ │ notifications│ job-124 send-email active 1m ago │
143
+ │ │ job-125 send-email waiting 30s ago │
144
+ │ │ │
145
+ ├──────────────┴──────────────────────────────────────────────────┤
146
+ │ j/k: navigate | Tab: switch pane | Enter: view | d: delete | q: quit │
147
+ └─────────────────────────────────────────────────────────────────┘
148
+ ```
149
+
150
+ ### Metrics Bar
151
+
152
+ | Metric | Description | Color |
153
+ | ------ | ------------------------------ | -------------------- |
154
+ | QUEUES | Total number of queues | White |
155
+ | WAIT | Jobs waiting to be processed | Yellow (red if >100) |
156
+ | ACTIVE | Jobs currently being processed | Green |
157
+ | DONE | Completed jobs | Blue |
158
+ | FAIL | Failed jobs | Red |
159
+ | DELAY | Delayed jobs | Mauve |
160
+ | ENQ | Jobs enqueued per minute | Teal |
161
+ | DEQ | Jobs dequeued per minute | Peach |
162
+
163
+ ## Development
164
+
165
+ ```bash
166
+ # Run in development mode
167
+ bun run dev
168
+
169
+ # Type check
170
+ bun run typecheck
171
+
172
+ # Lint
173
+ bun run lint
174
+
175
+ # Format
176
+ bun run format
177
+
178
+ # Build for production
179
+ bun run build
180
+
181
+ # Run production build
182
+ bun run start
183
+ ```
184
+
185
+ ## Tech Stack
186
+
187
+ - **Runtime**: [Bun](https://bun.sh/)
188
+ - **TUI Framework**: [@opentui/core](https://github.com/pinkpixel-co/opentui)
189
+ - **Queue Library**: [BullMQ](https://bullmq.io/)
190
+ - **Redis Client**: [ioredis](https://github.com/redis/ioredis)
191
+ - **Config Validation**: [Zod](https://zod.dev/)
192
+ - **Build Tool**: Bun bundler
193
+
194
+ ## Color Theme
195
+
196
+ BullMQ Dash uses the [Catppuccin Mocha](https://catppuccin.com/) color palette for a modern, easy-on-the-eyes aesthetic:
197
+
198
+ - **Base**: `#1e1e2e` - Main background
199
+ - **Text**: `#cdd6f4` - Primary text
200
+ - **Green**: `#a6e3a1` - Active/success states
201
+ - **Yellow**: `#f9e2af` - Waiting/warning states
202
+ - **Blue**: `#89b4fa` - Completed/info states
203
+ - **Red**: `#f38ba8` - Failed/error states
204
+ - **Mauve**: `#cba6f7` - Delayed jobs
205
+ - **Teal**: `#94e2d5` - Enqueue rate
206
+ - **Peach**: `#fab387` - Dequeue rate
207
+
208
+ ## License
209
+
210
+ MIT License - see [LICENSE](LICENSE) for details.
211
+
212
+ ## Author
213
+
214
+ [quanghuynt14](https://github.com/quanghuynt14)
215
+
216
+ ## Related Projects
217
+
218
+ - [BullMQ](https://bullmq.io/) - Premium Message Queue for Node.js
219
+ - [Bull Board](https://github.com/felixmosh/bull-board) - Web-based dashboard for BullMQ
package/dist/app.d.ts ADDED
@@ -0,0 +1,17 @@
1
+ export declare class App {
2
+ private renderer;
3
+ private elements;
4
+ private unsubscribeState;
5
+ start(): Promise<void>;
6
+ private createElements;
7
+ private setupKeyboardHandling;
8
+ private handleKeyPress;
9
+ private openJobDetail;
10
+ private openSchedulerDetail;
11
+ private openSchedulerNextJob;
12
+ private confirmDelete;
13
+ private confirmPageJump;
14
+ private render;
15
+ private cleanup;
16
+ }
17
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAgEA,qBAAa,GAAG;IACd,OAAO,CAAC,QAAQ,CAA4B;IAC5C,OAAO,CAAC,QAAQ,CAA4B;IAC5C,OAAO,CAAC,gBAAgB,CAA6B;IAE/C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA2B5B,OAAO,CAAC,cAAc;IA8BtB,OAAO,CAAC,qBAAqB;YAYf,cAAc;YAoJd,aAAa;YAgBb,mBAAmB;YAgBnB,oBAAoB;YAmBpB,aAAa;YA4Bb,eAAe;IAoB7B,OAAO,CAAC,MAAM;YAqGA,OAAO;CAoBtB"}
@@ -0,0 +1,45 @@
1
+ import { z } from "zod";
2
+ declare const configSchema: z.ZodObject<{
3
+ redis: z.ZodObject<{
4
+ host: z.ZodDefault<z.ZodString>;
5
+ port: z.ZodDefault<z.ZodNumber>;
6
+ password: z.ZodOptional<z.ZodString>;
7
+ db: z.ZodDefault<z.ZodNumber>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ host: string;
10
+ port: number;
11
+ db: number;
12
+ password?: string | undefined;
13
+ }, {
14
+ host?: string | undefined;
15
+ port?: number | undefined;
16
+ password?: string | undefined;
17
+ db?: number | undefined;
18
+ }>;
19
+ pollInterval: z.ZodDefault<z.ZodNumber>;
20
+ queueNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ redis: {
23
+ host: string;
24
+ port: number;
25
+ db: number;
26
+ password?: string | undefined;
27
+ };
28
+ pollInterval: number;
29
+ queueNames?: string[] | undefined;
30
+ }, {
31
+ redis: {
32
+ host?: string | undefined;
33
+ port?: number | undefined;
34
+ password?: string | undefined;
35
+ db?: number | undefined;
36
+ };
37
+ pollInterval?: number | undefined;
38
+ queueNames?: string[] | undefined;
39
+ }>;
40
+ export type Config = z.infer<typeof configSchema>;
41
+ export declare function parseQueueNames(value: string | undefined): string[] | undefined;
42
+ export declare function loadConfig(): Config;
43
+ export declare function getConfig(): Config;
44
+ export {};
45
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAShB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,SAAS,CAM/E;AAED,wBAAgB,UAAU,IAAI,MAAM,CAsBnC;AAKD,wBAAgB,SAAS,IAAI,MAAM,CAKlC"}
@@ -0,0 +1,48 @@
1
+ export type JobStatus = "latest" | "wait" | "active" | "completed" | "failed" | "delayed" | "scheduled";
2
+ export interface JobSummary {
3
+ id: string;
4
+ name: string;
5
+ state: string;
6
+ timestamp: number;
7
+ }
8
+ export interface JobDetail extends JobSummary {
9
+ data: unknown;
10
+ opts: unknown;
11
+ attemptsMade: number;
12
+ failedReason?: string;
13
+ stacktrace?: string[];
14
+ returnvalue?: unknown;
15
+ processedOn?: number;
16
+ finishedOn?: number;
17
+ progress?: number | object;
18
+ repeatJobKey?: string;
19
+ delay?: number;
20
+ }
21
+ export interface JobsResult {
22
+ jobs: JobSummary[];
23
+ total: number;
24
+ page: number;
25
+ pageSize: number;
26
+ totalPages: number;
27
+ }
28
+ /**
29
+ * Get jobs by status with pagination
30
+ */
31
+ export declare function getJobs(queueName: string, status: JobStatus, page?: number, pageSize?: number): Promise<JobsResult>;
32
+ /**
33
+ * Get detailed information for a single job
34
+ */
35
+ export declare function getJobDetail(queueName: string, jobId: string): Promise<JobDetail | null>;
36
+ /**
37
+ * Delete a job from a queue
38
+ */
39
+ export declare function deleteJob(queueName: string, jobId: string): Promise<boolean>;
40
+ /**
41
+ * Format timestamp to relative time string
42
+ */
43
+ export declare function formatRelativeTime(timestamp: number): string;
44
+ /**
45
+ * Format timestamp to ISO string
46
+ */
47
+ export declare function formatTimestamp(timestamp: number | undefined): string;
48
+ //# sourceMappingURL=jobs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../src/data/jobs.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AAExG,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAA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AG,SAAS,GAAG,MAAM,CAGrE"}
@@ -0,0 +1,26 @@
1
+ export interface GlobalMetrics {
2
+ queueCount: number;
3
+ jobCounts: {
4
+ wait: number;
5
+ active: number;
6
+ completed: number;
7
+ failed: number;
8
+ delayed: number;
9
+ total: number;
10
+ };
11
+ rates: {
12
+ enqueuedPerMin: number;
13
+ enqueuedPerSec: number;
14
+ dequeuedPerMin: number;
15
+ dequeuedPerSec: number;
16
+ };
17
+ }
18
+ /**
19
+ * Reset the metrics tracker (call when reconnecting or resetting state)
20
+ */
21
+ export declare function resetMetricsTracker(): void;
22
+ /**
23
+ * Get aggregated global metrics across all queues
24
+ */
25
+ export declare function getGlobalMetrics(): Promise<GlobalMetrics>;
26
+ //# sourceMappingURL=metrics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../src/data/metrics.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,KAAK,EAAE;QACL,cAAc,EAAE,MAAM,CAAC;QACvB,cAAc,EAAE,MAAM,CAAC;QACvB,cAAc,EAAE,MAAM,CAAC;QACvB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;CACH;AA0GD;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAED;;GAEG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC,CAqD/D"}
@@ -0,0 +1,34 @@
1
+ import { Queue } from "bullmq";
2
+ export interface QueueStats {
3
+ name: string;
4
+ counts: {
5
+ wait: number;
6
+ active: number;
7
+ completed: number;
8
+ failed: number;
9
+ delayed: number;
10
+ };
11
+ isPaused: boolean;
12
+ total: number;
13
+ }
14
+ /**
15
+ * Get or create a BullMQ Queue instance
16
+ */
17
+ export declare function getQueue(queueName: string): Queue;
18
+ /**
19
+ * Discover all queue names from Redis
20
+ */
21
+ export declare function discoverQueueNames(): Promise<string[]>;
22
+ /**
23
+ * Get stats for a single queue
24
+ */
25
+ export declare function getQueueStats(queueName: string): Promise<QueueStats>;
26
+ /**
27
+ * Get stats for all discovered queues
28
+ */
29
+ export declare function getAllQueueStats(): Promise<QueueStats[]>;
30
+ /**
31
+ * Close all queue connections
32
+ */
33
+ export declare function closeAllQueues(): Promise<void>;
34
+ //# sourceMappingURL=queues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queues.d.ts","sourceRoot":"","sources":["../../src/data/queues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAkB/B,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK,CAcjD;AAED;;GAEG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CA+C5D;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CA4B1E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAM9D;AAED;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAKpD"}
@@ -0,0 +1,6 @@
1
+ import Redis from "ioredis";
2
+ export declare function getRedisClient(): Redis;
3
+ export declare function connectRedis(): Promise<void>;
4
+ export declare function disconnectRedis(): Promise<void>;
5
+ export declare function pingRedis(): Promise<boolean>;
6
+ //# sourceMappingURL=redis.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redis.d.ts","sourceRoot":"","sources":["../../src/data/redis.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAK5B,wBAAgB,cAAc,IAAI,KAAK,CAkBtC;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAGlD;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAKrD;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAQlD"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Summary info for scheduler list view
3
+ */
4
+ export interface JobSchedulerSummary {
5
+ key: string;
6
+ name: string;
7
+ pattern?: string;
8
+ every?: number;
9
+ next?: number;
10
+ iterationCount?: number;
11
+ tz?: string;
12
+ }
13
+ /**
14
+ * Info about the next delayed job waiting to be processed
15
+ */
16
+ export interface NextDelayedJob {
17
+ id: string;
18
+ state: string;
19
+ timestamp: number;
20
+ delay?: number;
21
+ data: unknown;
22
+ opts: unknown;
23
+ }
24
+ /**
25
+ * Info about a recent job from history
26
+ */
27
+ export interface RecentJobInfo {
28
+ id: string;
29
+ state: string;
30
+ timestamp: number;
31
+ processedOn?: number;
32
+ finishedOn?: number;
33
+ failedReason?: string;
34
+ }
35
+ /**
36
+ * Full scheduler details for detail view
37
+ */
38
+ export interface JobSchedulerDetail extends JobSchedulerSummary {
39
+ id?: string | null;
40
+ limit?: number;
41
+ startDate?: number;
42
+ endDate?: number;
43
+ template?: {
44
+ data?: unknown;
45
+ opts?: unknown;
46
+ };
47
+ nextJob?: NextDelayedJob;
48
+ recentJobs?: RecentJobInfo[];
49
+ }
50
+ export interface SchedulersResult {
51
+ schedulers: JobSchedulerSummary[];
52
+ total: number;
53
+ page: number;
54
+ pageSize: number;
55
+ totalPages: number;
56
+ }
57
+ /**
58
+ * Get job schedulers with pagination
59
+ */
60
+ export declare function getJobSchedulers(queueName: string, page?: number, pageSize?: number): Promise<SchedulersResult>;
61
+ /**
62
+ * Get detailed information for a single job scheduler
63
+ */
64
+ export declare function getJobSchedulerDetail(queueName: string, schedulerKey: string): Promise<JobSchedulerDetail | null>;
65
+ /**
66
+ * Format interval (every) to human-readable string
67
+ */
68
+ export declare function formatInterval(ms: number | undefined): string;
69
+ /**
70
+ * Format next run time to relative string
71
+ */
72
+ export declare function formatNextRun(timestamp: number | undefined): string;
73
+ /**
74
+ * Format timestamp to ISO string
75
+ */
76
+ export declare function formatSchedulerTimestamp(timestamp: number | undefined): string;
77
+ /**
78
+ * Get schedule description (pattern or interval)
79
+ */
80
+ export declare function getScheduleDescription(scheduler: JobSchedulerSummary): string;
81
+ //# sourceMappingURL=schedulers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedulers.d.ts","sourceRoot":"","sources":["../../src/data/schedulers.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,IAA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