From 956c30947675a79f153228ca0eac2dea822f13b4 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 26 Jan 2023 18:39:51 -0500 Subject: [PATCH] run_pyl --- spiffworkflow-backend/pyproject.toml | 4 ++-- .../src/spiffworkflow_backend/exceptions/api_error.py | 5 +++-- .../services/process_instance_processor.py | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/spiffworkflow-backend/pyproject.toml b/spiffworkflow-backend/pyproject.toml index da45e6848..89edd680a 100644 --- a/spiffworkflow-backend/pyproject.toml +++ b/spiffworkflow-backend/pyproject.toml @@ -28,9 +28,9 @@ flask-migrate = "*" flask-restful = "*" werkzeug = "*" # temporarily switch off main to fix CI because poetry export doesn't capture the revision if it's not here (it ignores the lock) -# SpiffWorkflow = {git = "https://github.com/sartography/SpiffWorkflow", rev = "main"} +SpiffWorkflow = {git = "https://github.com/sartography/SpiffWorkflow", rev = "main"} # SpiffWorkflow = {git = "https://github.com/sartography/SpiffWorkflow", rev = "450ef3bcd639b6bc1c115fbe35bf3f93946cb0c7"} -SpiffWorkflow = {develop = true, path = "../SpiffWorkflow" } +# SpiffWorkflow = {develop = true, path = "../SpiffWorkflow" } sentry-sdk = "^1.10" sphinx-autoapi = "^2.0" flask-bpmn = {git = "https://github.com/sartography/flask-bpmn", rev = "main"} diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/exceptions/api_error.py b/spiffworkflow-backend/src/spiffworkflow_backend/exceptions/api_error.py index 58821d0c2..5574fe912 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/exceptions/api_error.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/exceptions/api_error.py @@ -8,7 +8,6 @@ from typing import Any import flask.wrappers import sentry_sdk -from SpiffWorkflow.bpmn.exceptions import WorkflowDataException from flask import Blueprint from flask import current_app from flask import g @@ -16,7 +15,8 @@ from flask import jsonify from flask import make_response from sentry_sdk import capture_exception from sentry_sdk import set_tag -from SpiffWorkflow.exceptions import WorkflowException, SpiffWorkflowException # type: ignore +from SpiffWorkflow.exceptions import SpiffWorkflowException # type: ignore +from SpiffWorkflow.exceptions import WorkflowException from SpiffWorkflow.exceptions import WorkflowTaskException from SpiffWorkflow.specs.base import TaskSpec # type: ignore from SpiffWorkflow.task import Task # type: ignore @@ -157,6 +157,7 @@ class ApiError(Exception): else: return ApiError("workflow_error", str(exp)) + def set_user_sentry_context() -> None: """Set_user_sentry_context.""" try: diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py index 469227b8d..c63380c95 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py @@ -19,7 +19,6 @@ from typing import TypedDict from typing import Union from uuid import UUID -import SpiffWorkflow import dateparser import pytz from flask import current_app @@ -38,7 +37,8 @@ from SpiffWorkflow.bpmn.specs.SubWorkflowTask import SubWorkflowTask # type: ig from SpiffWorkflow.bpmn.workflow import BpmnWorkflow # type: ignore from SpiffWorkflow.dmn.parser.BpmnDmnParser import BpmnDmnParser # type: ignore from SpiffWorkflow.dmn.serializer.task_spec_converters import BusinessRuleTaskConverter # type: ignore -from SpiffWorkflow.exceptions import WorkflowException, SpiffWorkflowException # type: ignore +from SpiffWorkflow.exceptions import SpiffWorkflowException # type: ignore +from SpiffWorkflow.exceptions import WorkflowException from SpiffWorkflow.exceptions import WorkflowTaskException from SpiffWorkflow.serializer.exceptions import MissingSpecError # type: ignore from SpiffWorkflow.spiff.serializer.task_spec_converters import BoundaryEventConverter # type: ignore