예제 #1
0
class JobSchemaV2(ApiStrictSchema):
    id = fields.Int()
    name = fields.Str()
    user = fields.Str()
    reported_by_user = fields.Str()
    is_archived = fields.Boolean()
    ui_hidden = fields.Boolean()
    is_airflow_synced = fields.Boolean()
    project_id = fields.Int()
    project_name = fields.Str()

    # computed
    run_states = fields.Dict()
    source_link = fields.Str()

    # joined
    latest_run_start_time = fields.DateTime()
    latest_run_state = fields.Str()
    latest_run_uid = fields.UUID()
    latest_run_root_task_run_uid = fields.UUID()
    latest_run_trigger = fields.Str()
    latest_run_env = fields.Str()
    source_instance_name = fields.Str()
    source_type = fields.Str()
    airflow_instance_name = fields.Str()  # TODO_SERVER: API: Deprecate

    scheduled_job_count = fields.Number()
예제 #2
0
파일: common.py 프로젝트: databand-ai/dbnd
class TaskRunAttemptSchema(ApiStrictSchema):
    task_run_uid = fields.UUID()
    task_run_attempt_uid = fields.UUID()
    state = EnumField(TaskRunState, allow_none=True)
    timestamp = fields.DateTime(allow_none=True)
    first_error = fields.Nested(ErrorInfoSchema, allow_none=True)
    latest_error = fields.Nested(ErrorInfoSchema, allow_none=True)
    attempt_number = fields.Number(allow_none=True)
    source = fields.Str(allow_none=True)
    start_date = fields.DateTime(allow_none=True)
    end_date = fields.DateTime(allow_none=True)
    external_links_dict = fields.Dict(allow_none=True)
예제 #3
0
파일: tracking_api.py 프로젝트: Dtchil/dbnd
class TaskRunAttemptUpdateArgsSchema(ApiObjectSchema):
    task_run_uid = fields.UUID()
    task_run_attempt_uid = fields.UUID()
    state = EnumField(TaskRunState, allow_none=True)
    timestamp = fields.DateTime(allow_none=True)
    error = fields.Nested(ErrorInfoSchema, allow_none=True)
    attempt_number = fields.Number(allow_none=True)
    source = fields.Str(allow_none=True)
    start_date = fields.DateTime(allow_none=True)

    @post_load
    def make_object(self, data, **kwargs):
        return TaskRunAttemptUpdateArgs(**data)
예제 #4
0
class JobSchemaV2(ApiObjectSchema):
    id = fields.Int()
    name = fields.Str()
    user = fields.Str()
    ui_hidden = fields.Boolean()
    is_airflow_synced = fields.Boolean()

    # computed
    run_states = fields.Dict()
    airflow_link = fields.Str()

    # joined
    latest_run_start_time = fields.DateTime()
    latest_run_state = fields.Str()
    latest_run_uid = fields.UUID()
    latest_run_root_task_run_uid = fields.UUID()
    latest_run_trigger = fields.Str()
    latest_run_env = fields.Str()

    scheduled_job_count = fields.Number()