Job_Base
Job_Base ¶
Application_CRUD_Error ¶
Application_CRUD_Error(
operation: str,
entity_id: str | None = None,
res: ResponseGetData | None = None,
message: str | None = None,
**kwargs
)
Bases: RouteError
Raised when application create, update, or delete operations fail.
This exception is used for failures during application job creation, modification, or execution operations.
Source code in src/crew_dcs/routes/application.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | |
DomoJob_Base
dataclass
¶
DomoJob_Base(
auth: DomoAuth,
id: str = None,
raw: dict = dict(),
name: str = None,
application_id: str = None,
logs_dataset_id: str = None,
user_id: str = None,
execution_timeout: int = 1440,
is_enabled: bool = False,
customer_id: str = None,
created_dt: datetime = None,
updated_dt: datetime = None,
description: str = None,
execution_payload: dict = dict(),
share_state: dict = dict(),
accounts: list[str] = list(),
triggers: list[DomoTrigger] = list(),
)
Bases: DomoEntity
the base class only captures attributes applicable to all jobs (i.e. does not destructure execution_payload onto the class) build Application / Job extensions by creating children of the DomoJob_Base class
display_url
property
¶
display_url: str
Generate the URL to display this job in the Domo interface.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Complete URL to view the job in Domo |
from_dict
classmethod
¶
from_dict(auth: DomoAuth, obj: dict[str, Any])
Create a DomoJob_Base instance from an API response dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object for API requests |
required |
obj
|
dict[str, Any]
|
Dictionary representation of the job from API response |
required |
Returns:
| Type | Description |
|---|---|
|
DomoJob_Base instance |
Source code in src/crew_dcs/classes/DomoApplication/Job_Base.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
get_by_id
async
classmethod
¶
get_by_id(
auth: DomoAuth,
application_id: str,
job_id: str,
session: AsyncClient | None = None,
debug_api: bool = False,
debug_num_stacks_to_drop: int = 2,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
)
Retrieve a job by its ID from a specific application.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object for API requests |
required |
application_id
|
str
|
The ID of the application containing the job |
required |
job_id
|
str
|
The ID of the job to retrieve |
required |
session
|
AsyncClient | None
|
Optional HTTP session for connection pooling |
None
|
debug_api
|
bool
|
Enable API debugging output |
False
|
debug_num_stacks_to_drop
|
int
|
Number of stack frames to drop in debugging |
2
|
return_raw
|
bool
|
Return raw response without processing |
False
|
Returns:
| Type | Description |
|---|---|
|
DomoJob_Base instance or ResponseGetData if return_raw=True |
Raises:
| Type | Description |
|---|---|
ApplicationNoJobRetrievedError
|
If job retrieval fails |
Source code in src/crew_dcs/classes/DomoApplication/Job_Base.py
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | |
to_dict ¶
to_dict()
this is an abstract method, each DomoJob_Base implementation must define a to_dict() function
Source code in src/crew_dcs/classes/DomoApplication/Job_Base.py
333 334 335 | |