ManagementMonque
Defined in: surface/types.ts:41
Scheduler API required by @monque/management.
Pass a Monque instance directly for full support, or provide a facade that implements
only the methods you want exposed. Missing mutation methods make the matching endpoints
return 403 Unsupported action.
Properties
Section titled “Properties”getProcessingState?
Section titled “getProcessingState?”Defined in: surface/types.ts:42
Identify the local scheduler and inspect global or named-worker processing state.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name? | string |
Returns
Section titled “Returns”ProcessingState
getQueueViewSummaries
Section titled “getQueueViewSummaries”Defined in: surface/types.ts:46
Get operator-facing Queue View summaries grouped by Job Name.
Includes every Job Name with persisted Jobs, every locally registered Worker, per-name Job statistics, and local Worker capacity snapshots. Results are sorted by Job Name. An optional name filter limits aggregation to that Job Name.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
filter? | Pick<JobSelector, "name"> | Optional exact Job Name filter |
Returns
Section titled “Returns”Promise<readonly QueueViewSummary[]>
Promise resolving to immutable Queue View summaries
Example
Section titled “Example”Inspect Queue Views
JobQueryService.getQueueViewSummaries
isHealthy
Section titled “isHealthy”Defined in: surface/types.ts:45
Check if the scheduler is healthy (running and connected).
Returns true when the scheduler is started, initialized, and has an active
MongoDB collection reference. Useful for health check endpoints and monitoring.
A healthy scheduler:
- Has called
initialize()successfully - Has called
start()and is actively polling - Has a valid MongoDB collection reference
Returns
Section titled “Returns”boolean
true if scheduler is running and connected, false otherwise
Examples
Section titled “Examples”Express health check endpoint
Kubernetes readiness probe
Periodic health monitoring
pause?
Section titled “pause?”Defined in: surface/types.ts:43
Pause new executions locally, optionally for one job name. Running jobs continue.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name? | string |
Returns
Section titled “Returns”void
resume?
Section titled “resume?”Defined in: surface/types.ts:44
Resume local executions. Resuming the instance preserves individually paused workers.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name? | string |
Returns
Section titled “Returns”void
Methods
Section titled “Methods”cancelJob()?
Section titled “cancelJob()?”Defined in: surface/types.ts:53
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id | string |
Returns
Section titled “Returns”Promise<PersistedJob | null>
cancelJobs()?
Section titled “cancelJobs()?”Defined in: surface/types.ts:58
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
selector | JobSelector |
Returns
Section titled “Returns”Promise<BulkOperationResult>
deleteJob()?
Section titled “deleteJob()?”Defined in: surface/types.ts:57
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id | string |
Returns
Section titled “Returns”Promise<boolean>
deleteJobs()?
Section titled “deleteJobs()?”Defined in: surface/types.ts:60
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
selector | JobSelector |
Returns
Section titled “Returns”Promise<BulkOperationResult>
getJob()
Section titled “getJob()”Defined in: surface/types.ts:51
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id | string |
Returns
Section titled “Returns”Promise<PersistedJob | null>
getJobSummariesWithCursor()?
Section titled “getJobSummariesWithCursor()?”Defined in: surface/types.ts:48
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | CursorOptions |
Returns
Section titled “Returns”Promise<Omit<CursorPage<unknown>, "jobs"> & object>
getJobsWithCursor()
Section titled “getJobsWithCursor()”Defined in: surface/types.ts:47
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | CursorOptions |
Returns
Section titled “Returns”Promise<CursorPage<unknown>>
getQueueStats()
Section titled “getQueueStats()”Defined in: surface/types.ts:52
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
filter? | { name?: string; } |
filter.name? | string |
Returns
Section titled “Returns”Promise<QueueStats>
rescheduleJob()?
Section titled “rescheduleJob()?”Defined in: surface/types.ts:55
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id | string |
runAt | Date |
Returns
Section titled “Returns”Promise<PersistedJob | null>
retryJob()?
Section titled “retryJob()?”Defined in: surface/types.ts:54
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id | string |
Returns
Section titled “Returns”Promise<PersistedJob | null>
retryJobs()?
Section titled “retryJobs()?”Defined in: surface/types.ts:59
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
selector | JobSelector |
Returns
Section titled “Returns”Promise<BulkOperationResult>
setJobPriority()?
Section titled “setJobPriority()?”Defined in: surface/types.ts:56
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id | string |
priority | number |
Returns
Section titled “Returns”Promise<PersistedJob | null>