def pipelines_start_operation(operation_run_id: int) -> None: operation_run = get_valid_operation_run(operation_run_id=operation_run_id) if not operation_run: _logger.info('Operation `%s` does not exist any more.', operation_run_id) start_operation_run(operation_run)
def start_operation(operation_run_id): op_run = get_valid_operation_run(operation_run_id=operation_run_id) operation = op_run.operation pipeline = operation.pipeline op_run.entity = create_entity(user_id=pipeline.user_id, project_id=pipeline.project_id, entity_type=operation.entity_type, content=operation.content) op_run.status = OperationStatuses.CREATED op_run.save()