flexmeasures.api.v3_0.jobs
Classes
- class flexmeasures.api.v3_0.jobs.JobAPI
Endpoint for querying the status of background jobs by UUID.
- get_job_status(job_id: str, **kwargs)
— get:
summary: Get the status of a background job description: |
Look up a background job by its UUID and see whether it is queued, running, finished, or failed.
The response includes a status message plus job metadata such as the queue name, function name, timestamps, and the job result when available.
Failed jobs also include traceback information when the worker stored it with the job result.
- security:
ApiKeyAuth: []
- parameters:
in: path name: uuid required: true description: UUID of the background job. example: b3d26a8a-7a43-4a9f-93e1-fc2a869ea97b schema:
type: string
- responses:
- 200:
description: Job status retrieved successfully. content:
- application/json:
- schema:
type: object properties:
- status:
type: string enum:
QUEUED
STARTED
FINISHED
FAILED
DEFERRED
SCHEDULED
STOPPED
CANCELED
description: Current status of the job.
- message:
type: string description: Human-readable description of the job status.
- result:
description: Return value of the job function, or null when not yet available. nullable: true
- func_name:
type: string description: Fully-qualified name of the function executed by this job.
- origin:
type: string description: Name of the queue the job was placed on.
- enqueued_at:
type: string format: date-time nullable: true description: ISO-8601 timestamp of when the job was enqueued.
- started_at:
type: string format: date-time nullable: true description: ISO-8601 timestamp of when the job started executing.
- ended_at:
type: string format: date-time nullable: true description: ISO-8601 timestamp of when the job finished executing.
- exc_info:
type: string nullable: true description: Traceback information for failed jobs, or null otherwise.
- examples:
- queued:
summary: Queued job value:
status: QUEUED message: “Scheduling job waiting to be processed.” result: null func_name: “flexmeasures.data.services.scheduling.create_schedule” origin: scheduling enqueued_at: “2026-04-28T10:00:00+00:00” started_at: null ended_at: null exc_info: null
- finished:
summary: Finished job value:
status: FINISHED message: “Scheduling job has finished.” result: null func_name: “flexmeasures.data.services.scheduling.create_schedule” origin: scheduling enqueued_at: “2026-04-28T10:00:00+00:00” started_at: “2026-04-28T10:00:01+00:00” ended_at: “2026-04-28T10:00:05+00:00” exc_info: null
- failed:
summary: Failed job value:
status: FAILED message: “Scheduling job failed with ValueError: …” result: null func_name: “flexmeasures.data.services.scheduling.create_schedule” origin: scheduling enqueued_at: “2026-04-28T10:00:00+00:00” started_at: “2026-04-28T10:00:01+00:00” ended_at: “2026-04-28T10:00:02+00:00” exc_info: “Traceback (most recent call last): …”
- 404:
description: NOT_FOUND
- 401:
description: UNAUTHORIZED
- 403:
description: INVALID_SENDER
- 503:
description: SERVICE_UNAVAILABLE
- tags:
Jobs