diff --git a/headers_ignore_config.json b/headers_ignore_config.json index bbd0a5f7..922c10a4 100644 --- a/headers_ignore_config.json +++ b/headers_ignore_config.json @@ -39,6 +39,7 @@ "migrations/versions/b4c65e383551_default_groups.py", "migrations/versions/35ba4ee9fc53_add_error_management_on_study_object.py", "migrations/versions/2db3dd3d7e5c_increase_size_of_repository.py", + "migrations/versions/6d471f14fb35_update_column_execution_message.py", "sos_trades_api/version.info" ], "airbus_rev_commit": "09b208" diff --git a/migrations/versions/6d471f14fb35_update_column_execution_message.py b/migrations/versions/6d471f14fb35_update_column_execution_message.py new file mode 100644 index 00000000..d1c797aa --- /dev/null +++ b/migrations/versions/6d471f14fb35_update_column_execution_message.py @@ -0,0 +1,35 @@ +"""update column execution message + +Revision ID: 6d471f14fb35 +Revises: 9187d11fbebc +Create Date: 2024-10-21 09:01:41.850232 + +""" +from alembic import op +from sqlalchemy.dialects import mysql + +# revision identifiers, used by Alembic. +revision = '6d471f14fb35' +down_revision = '9187d11fbebc' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table('study_case_execution', schema=None) as batch_op: + batch_op.alter_column('message', + existing_type=mysql.TEXT, + nullable=True) + + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table('study_case_execution', schema=None) as batch_op: + batch_op.alter_column('message', + existing_type=mysql.VARCHAR(length=64), + nullable=True) + + # ### end Alembic commands ### diff --git a/sos_trades_api/controllers/sostrades_main/study_case_controller.py b/sos_trades_api/controllers/sostrades_main/study_case_controller.py index c113d3bc..e6441bc2 100644 --- a/sos_trades_api/controllers/sostrades_main/study_case_controller.py +++ b/sos_trades_api/controllers/sostrades_main/study_case_controller.py @@ -304,6 +304,7 @@ def get_study_load_status(study_id): return status + def load_study_case(study_id, study_access_right, user_id, reload=False): """ Retrieve all the study cases shared groups names list from user_id @@ -390,6 +391,7 @@ def load_study_case(study_id, study_access_right, user_id, reload=False): return loaded_study_case + def launch_load_study_in_background(study_manager, no_data, read_only): """ Launch only the background thread diff --git a/sos_trades_api/models/database_models.py b/sos_trades_api/models/database_models.py index 9e26db3e..1a793537 100644 --- a/sos_trades_api/models/database_models.py +++ b/sos_trades_api/models/database_models.py @@ -783,7 +783,7 @@ class StudyCaseExecution(db.Model): requested_by = Column(String(64), index=True, unique=False, server_default="", nullable=False) cpu_usage = Column(String(32), index=False, unique=False, server_default="----", nullable=True) memory_usage = Column(String(32), index=False, unique=False, server_default="----", nullable=True) - message = Column(String(64), index=False, unique=False, server_default="", nullable=True) + message = Column(Text, index=False, unique=False, server_default="", nullable=True) def serialize(self): """ diff --git a/sos_trades_api/tools/loading/loading_study_and_engine.py b/sos_trades_api/tools/loading/loading_study_and_engine.py index 2f3d6e3e..97a3cbd0 100644 --- a/sos_trades_api/tools/loading/loading_study_and_engine.py +++ b/sos_trades_api/tools/loading/loading_study_and_engine.py @@ -130,12 +130,14 @@ def study_case_manager_loading(study_case_manager, no_data, read_only, profile_l study_case_manager.execution_engine.get_treeview(no_data, read_only) treeview_generation_time = time() + # if the study has been edited (change of study name), the readonly file has been deleted # at the end of the loading, if the readonly file has not been created # and the status is DONE, create the file again if study_case_manager.execution_engine.root_process.status == ProxyDiscipline.STATUS_DONE \ and not study_case_manager.check_study_case_json_file_exists(): study_case_manager.save_study_read_only_mode_in_file() + study_case_manager.load_status = LoadStatus.LOADED diff --git a/sos_trades_api/version.info b/sos_trades_api/version.info index c0fd6efb..24cfdb7a 100644 --- a/sos_trades_api/version.info +++ b/sos_trades_api/version.info @@ -1 +1 @@ -Fri Oct 18 21:17:23 UTC 2024 +Tue Oct 22 21:18:17 UTC 2024