jobflow_remote.jobs.report module#

class jobflow_remote.jobs.report.FlowTrends(interval: str, dates: list[str], completed: list[int], failed: list[int], timezone: str)[source]#

Bases: object

Trends of flow states over time.

completed: list[int]#
dates: list[str]#
failed: list[int]#
interval: str#
property num_intervals: int#
timezone: str#
class jobflow_remote.jobs.report.FlowsReport(state_counts: dict[FlowState, int], trends: FlowTrends)[source]#

Bases: object

A report of the flow states.

property completed: int#

Returns the count of completed flows.

property error: int#

Returns the count of failed flows.

classmethod generate_report(job_controller: JobController, interval: str = 'days', num_intervals: int = None, timezone: str = 'UTC')[source]#

Generates a report of the flow states.

Parameters:
  • job_controller – The JobController instance to generate the report from.

  • interval – The interval of the trends for the report.

  • num_intervals – The number of intervals to consider.

  • timezone – The timezone to use for the report.

Returns:

A report of the flow states.

Return type:

FlowsReport

property running: int#

Returns the count of running flows.

state_counts: dict[FlowState, int]#
trends: FlowTrends#
class jobflow_remote.jobs.report.JobTrends(interval: str, dates: list[str], completed: list[int], failed: list[int], remote_error: list[int], timezone: str)[source]#

Bases: object

Trends of job states over time.

completed: list[int]#
dates: list[str]#
failed: list[int]#
interval: str#
property num_intervals: int#
remote_error: list[int]#
timezone: str#
class jobflow_remote.jobs.report.JobsReport(state_counts: dict[~jobflow_remote.jobs.state.JobState, int] = <factory>, trends: ~jobflow_remote.jobs.report.JobTrends | None = None, longest_running: list[~jobflow_remote.jobs.data.JobInfo] = <factory>, worker_utilization: dict[str, int] = <factory>)[source]#

Bases: object

A report of the job states.

property active: int#

Returns the sum of failed, remote error, and paused jobs (i.e., error states).

property completed: int#

Returns the count of completed jobs.

property error: int#

Returns the sum of failed, remote error, and paused jobs (i.e., error states).

classmethod generate_report(job_controller: JobController, interval: str = 'days', num_intervals: int | None = None, timezone: str = 'UTC') JobsReport[source]#

Generates a report of the job states.

Parameters:
  • job_controller – The JobController instance to generate the report from.

  • interval – The interval of the trends for the report.

  • num_intervals – The number of intervals to consider.

  • timezone – The timezone to use for the report.

Returns:

A report of the job states.

Return type:

JobsReport

longest_running: list[JobInfo]#
property running: int#

Returns the count of running jobs.

state_counts: dict[JobState, int]#
trends: JobTrends | None = None#
worker_utilization: dict[str, int]#