From a1ec494ab3f19467d58ea6f5e3ac06810be08a57 Mon Sep 17 00:00:00 2001 From: burnettk Date: Mon, 27 Feb 2023 19:16:06 -0500 Subject: [PATCH] let env var work on windows and fixing typing issue on python 3.9 w/ messaging stuff --- .github/workflows/backend_tests.yml | 6 +++--- spiffworkflow-backend/migrations/env.py | 2 -- .../src/spiffworkflow_backend/services/message_service.py | 4 +++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/backend_tests.yml b/.github/workflows/backend_tests.yml index 150f13eb..ab512e10 100644 --- a/.github/workflows/backend_tests.yml +++ b/.github/workflows/backend_tests.yml @@ -130,9 +130,9 @@ jobs: run: poetry install - name: Setup sqlite if: matrix.database == 'sqlite' - run: | - export SPIFFWORKFLOW_BACKEND_BPMN_SPEC_ABSOLUTE_DIR="${GITHUB_WORKSPACE}/sample-process-models" - ./bin/recreate_db clean rmall + env: + SPIFFWORKFLOW_BACKEND_BPMN_SPEC_ABSOLUTE_DIR: "${GITHUB_WORKSPACE}/sample-process-models" + run: ./bin/recreate_db clean rmall - name: Setup Mysql uses: mirromutth/mysql-action@v1.1 diff --git a/spiffworkflow-backend/migrations/env.py b/spiffworkflow-backend/migrations/env.py index 68feded2..630e381a 100644 --- a/spiffworkflow-backend/migrations/env.py +++ b/spiffworkflow-backend/migrations/env.py @@ -1,5 +1,3 @@ -from __future__ import with_statement - import logging from logging.config import fileConfig diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/message_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/message_service.py index fb9ef6c4..9129919a 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/message_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/message_service.py @@ -1,4 +1,6 @@ """Message_service.""" +from typing import Optional + from spiffworkflow_backend.models.db import db from spiffworkflow_backend.models.message_instance import MessageInstanceModel from spiffworkflow_backend.models.message_instance import MessageStatuses @@ -47,7 +49,7 @@ class MessageService: status=MessageStatuses.ready.value, message_type=MessageTypes.receive.value, ).all() - message_instance_receive: MessageInstanceModel | None = None + message_instance_receive: Optional[MessageInstanceModel] = None try: for message_instance in available_receive_messages: if message_instance.correlates(