Batch¶
This module provides access to the batch REST api of Camunda.
Batch¶
-
class
pycamunda.batch.
Batch
(id_: str, type_: str, total_jobs: int, jobs_created: int, batch_jobs_per_seed: int, invocations_per_batch_job: int, seed_job_definition_id: str, monitor_job_definition_id: str, batch_job_definition_id: str, suspended: bool, tenant_id: str, create_user_id: str)¶ Data class of batch as returned by the REST api of Camunda.
BatchStats¶
-
class
pycamunda.batch.
BatchStats
(id_: str, type_: str, total_jobs: int, jobs_created: int, batch_jobs_per_seed: int, invocations_per_batch_job: int, seed_job_definition_id: str, monitor_job_definition_id: str, batch_job_definition_id: str, suspended: bool, tenant_id: str, create_user_id: str, remaining_jobs: int, completed_jobs: int, failed_jobs: int)¶ Data class of batch statistics as returned by the REST api of Camunda.
GetList¶
-
class
pycamunda.batch.
GetList
(url: str, batch_id: Optional[str] = None, type_: Optional[str] = None, tenant_id_in: Optional[Iterable[str]] = None, without_tenant_id: bool = False, suspended: bool = False, sort_by: Optional[str] = None, ascending: bool = True, first_result: Optional[int] = None, max_results: Optional[int] = None)¶ Get a list of batches.
Parameters: - url – Camunda Rest engine URL.
- batch_id – Filter by id.
- type – Filter by batch type.
- tenant_id_in – Filter whether the tenant id is one of multiple ones.
- without_tenant_id – Whether to include only batches that belong to no tenant.
- suspended – Whether to include only suspended batches.
- sort_by – Sort the results by ‘batch_id’ or ‘tenant_id’.
- ascending – Sort order.
- first_result – Pagination of results. Index of the first result to return.
- max_results – Pagination of results. Maximum number of results to return.
-
__call__
(*args, **kwargs) → Tuple[pycamunda.batch.Batch]¶ Send the request.
Count¶
-
class
pycamunda.batch.
Count
(url: str, batch_id: Optional[str] = None, type_: Optional[str] = None, tenant_id_in: Optional[Iterable[str]] = None, without_tenant_id: bool = False, suspended: bool = False)¶ Count batches.
Parameters: - url – Camunda Rest engine URL.
- batch_id – Filter by id.
- type – Filter by batch type.
- tenant_id_in – Filter whether the tenant id is one of multiple ones.
- without_tenant_id – Whether to include only batches that belong to no tenant.
- suspended – Whether to include only suspended batches.
-
__call__
(*args, **kwargs) → int¶ Send the request.
Get¶
Activate¶
-
class
pycamunda.batch.
Activate
(url: str, id_: str)¶ Activate a batch.
Parameters: - url – Camunda Rest engine URL.
- id – Id of the batch.
Suspend¶
-
class
pycamunda.batch.
Suspend
(url: str, id_: str)¶ Suspend a batch.
Parameters: - url – Camunda Rest engine URL.
- id – Id of the batch.
Delete¶
GetStats¶
-
class
pycamunda.batch.
GetStats
(url: str, batch_id: Optional[str] = None, type_: Optional[str] = None, tenant_id_in: Optional[Iterable[str]] = None, without_tenant_id: bool = False, suspended: bool = False, sort_by: Optional[str] = None, ascending: bool = True, first_result: Optional[int] = None, max_results: Optional[int] = None)¶ Get batch statistics.
Parameters: - url – Camunda Rest engine URL.
- batch_id – Filter by id.
- type – Filter by batch type.
- tenant_id_in – Filter whether the tenant id is one of multiple ones.
- without_tenant_id – Whether to include only batches that belong to no tenant.
- suspended – Whether to include only suspended batches.
- sort_by – Sort the results by ‘batch_id’ or ‘tenant_id’.
- ascending – Sort order.
- first_result – Pagination of results. Index of the first result to return.
- max_results – Pagination of results. Maximum number of results to return.
-
__call__
(*args, **kwargs) → Tuple[pycamunda.batch.BatchStats]¶ Send the request.
CountStats¶
-
class
pycamunda.batch.
CountStats
(url: str, batch_id: Optional[str] = None, type_: Optional[str] = None, tenant_id_in: Optional[Iterable[str]] = None, without_tenant_id: bool = False, suspended: bool = False)¶ Count batch statistics.
Parameters: - url – Camunda Rest engine URL.
- batch_id – Filter by id.
- type – Filter by batch type.
- tenant_id_in – Filter whether the tenant id is one of multiple ones.
- without_tenant_id – Whether to include only batches that belong to no tenant.
- suspended – Whether to include only suspended batches.
-
__call__
(*args, **kwargs) → Tuple[pycamunda.batch.BatchStats]¶ Send the request.