Appearance
Monitoring Background Jobs
Many operations in StrawBlond are processed asynchronously using background jobs to ensure fast response times and better user experience. This includes tasks like importing bank transactions, processing expenses, generating reports, and sending notifications.
Background job batches
When you trigger an operation that requires multiple background jobs (like importing a bank statement with many transactions), StrawBlond creates a batch to group these jobs together. This allows you to monitor the overall progress of the entire operation.
Monitoring batch progress
get
/batch/{batchId}
Use this endpoint to check the status of any background job batch using the batch ID returned from operations that create batches.
Example response
json
// HTTP 200 OK
{
"id": "9c3b5e4d-8f2a-4b6c-9d1e-2f3a4b5c6d7e",
"name": "bank_statement.xml",
"totalJobs": 25,
"pendingJobs": 5,
"processedJobs": 18,
"failedJobs": 2,
"progress": 72,
"finished": false,
"cancelled": false
}
Batch status fields
Field | Type | Description |
---|---|---|
id | String | Unique batch identifier (UUID) |
name | String? | Human-readable name for the batch (often the original filename) |
totalJobs | Integer | Total number of jobs assigned to the batch |
pendingJobs | Integer | Number of jobs that have not been processed by the queue |
processedJobs | Integer | Number of jobs that have been processed thus far |
failedJobs | Integer | Number of jobs that have failed |
progress | Integer | Progress percentage of the batch (0-100) |
finished | Boolean | Whether the batch has finished executing |
cancelled | Boolean | Whether the batch has been cancelled |