From 4fdb0f3ec4b3b6a68cc2e56ed84ffb6dc2743068 Mon Sep 17 00:00:00 2001 From: burnettk Date: Wed, 19 Oct 2022 19:32:59 -0400 Subject: [PATCH] Squashed 'spiffworkflow-backend/' changes from 22bc66758..af8dd9e2d af8dd9e2d Merge branch 'main' of github.com:sartography/spiffworkflow-backend into main 2f40b0d7f Post, Not Get -- to the connector proxy Allow insane large task data in the database git-subtree-dir: spiffworkflow-backend git-subtree-split: af8dd9e2d6cd116034e1df3b00e4c7186ffe7dba --- migrations/env.py | 2 ++ .../versions/{3a95e16cf17c_.py => 9e14b40371f3_.py} | 8 ++++---- src/spiffworkflow_backend/models/active_task.py | 2 +- .../services/service_task_service.py | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) rename migrations/versions/{3a95e16cf17c_.py => 9e14b40371f3_.py} (99%) diff --git a/migrations/env.py b/migrations/env.py index 630e381a..68feded2 100644 --- a/migrations/env.py +++ b/migrations/env.py @@ -1,3 +1,5 @@ +from __future__ import with_statement + import logging from logging.config import fileConfig diff --git a/migrations/versions/3a95e16cf17c_.py b/migrations/versions/9e14b40371f3_.py similarity index 99% rename from migrations/versions/3a95e16cf17c_.py rename to migrations/versions/9e14b40371f3_.py index 73e78b66..69e6631d 100644 --- a/migrations/versions/3a95e16cf17c_.py +++ b/migrations/versions/9e14b40371f3_.py @@ -1,8 +1,8 @@ """empty message -Revision ID: 3a95e16cf17c +Revision ID: 9e14b40371f3 Revises: -Create Date: 2022-10-19 12:42:38.086243 +Create Date: 2022-10-19 19:31:20.431800 """ from alembic import op @@ -10,7 +10,7 @@ import sqlalchemy as sa # revision identifiers, used by Alembic. -revision = '3a95e16cf17c' +revision = '9e14b40371f3' down_revision = None branch_labels = None depends_on = None @@ -166,7 +166,7 @@ def upgrade(): sa.Column('task_type', sa.String(length=50), nullable=True), sa.Column('task_status', sa.String(length=50), nullable=True), sa.Column('process_model_display_name', sa.String(length=255), nullable=True), - sa.Column('task_data', sa.Text(), nullable=True), + sa.Column('task_data', sa.Text(length=4294000000), nullable=True), sa.ForeignKeyConstraint(['assigned_principal_id'], ['principal.id'], ), sa.ForeignKeyConstraint(['process_instance_id'], ['process_instance.id'], ), sa.PrimaryKeyConstraint('id'), diff --git a/src/spiffworkflow_backend/models/active_task.py b/src/spiffworkflow_backend/models/active_task.py index b6041b83..f9daebe8 100644 --- a/src/spiffworkflow_backend/models/active_task.py +++ b/src/spiffworkflow_backend/models/active_task.py @@ -46,7 +46,7 @@ class ActiveTaskModel(SpiffworkflowBaseDBModel): task_type = db.Column(db.String(50)) task_status = db.Column(db.String(50)) process_model_display_name = db.Column(db.String(255)) - task_data: str = db.Column(db.Text) + task_data: str = db.Column(db.Text(4294000000)) @classmethod def to_task(cls, task: ActiveTaskModel) -> Task: diff --git a/src/spiffworkflow_backend/services/service_task_service.py b/src/spiffworkflow_backend/services/service_task_service.py index 173d8789..bb74a3d0 100644 --- a/src/spiffworkflow_backend/services/service_task_service.py +++ b/src/spiffworkflow_backend/services/service_task_service.py @@ -52,7 +52,7 @@ class ServiceTaskDelegate: } params["spiff__task_data"] = json.dumps(task_data) - proxied_response = requests.get(f"{connector_proxy_url()}/v1/do/{name}", params) + proxied_response = requests.post(f"{connector_proxy_url()}/v1/do/{name}", params) if proxied_response.status_code != 200: print("got error from connector proxy")