This commit is contained in:
mike cullerton 2022-11-21 16:29:47 -05:00
parent e36bf1b548
commit 426d54790c
4 changed files with 15 additions and 15 deletions

View File

@ -32,7 +32,7 @@ class FileSystemService:
return os.path.join(app_root, "..", dir_name)
@staticmethod
def id_string_to_relative_path(id_string):
def id_string_to_relative_path(id_string: str) -> str:
return id_string.replace("/", os.sep)
@staticmethod

View File

@ -212,14 +212,14 @@ class DBHandler(logging.Handler):
bpmn_process_identifier = record.workflow # type: ignore
spiff_task_guid = str(record.task_id) # type: ignore
bpmn_task_identifier = str(record.task_spec) # type: ignore
bpmn_task_name = record.task_name if hasattr(record, "task_name") else None # type: ignore
bpmn_task_type = record.task_type if hasattr(record, "task_type") else None # type: ignore
bpmn_task_name = record.task_name if hasattr(record, "task_name") else None
bpmn_task_type = record.task_type if hasattr(record, "task_type") else None
timestamp = record.created
message = record.msg if hasattr(record, "msg") else None
current_user_id = record.current_user_id if hasattr(record, "current_user_id") else None # type: ignore
current_user_id = record.current_user_id if hasattr(record, "current_user_id") else None
spiff_step = (
record.spiff_step # type: ignore
if hasattr(record, "spiff_step") and record.spiff_step is not None # type: ignore
record.spiff_step
if hasattr(record, "spiff_step") and record.spiff_step is not None
else 1
)
self.logs.append(

View File

@ -1008,7 +1008,7 @@ class ProcessInstanceProcessor:
spiff_logger = logging.getLogger("spiff")
for handler in spiff_logger.handlers:
if hasattr(handler, "bulk_insert_logs"):
handler.bulk_insert_logs() # type: ignore
handler.bulk_insert_logs()
db.session.commit()
except WorkflowTaskExecException as we:

View File

@ -19,15 +19,15 @@ from spiffworkflow_backend.models.secret_model import SecretModel
class SecretService:
"""SecretService."""
def encrypt_key(self, plain_key: str) -> str:
"""Encrypt_key."""
# flask_secret = current_app.secret_key
# print("encrypt_key")
...
# def encrypt_key(self, plain_key: str) -> str:
# """Encrypt_key."""
# # flask_secret = current_app.secret_key
# # print("encrypt_key")
# ...
def decrypt_key(self, encrypted_key: str) -> str:
"""Decrypt key."""
...
# def decrypt_key(self, encrypted_key: str) -> str:
# """Decrypt key."""
# ...
@staticmethod
def add_secret(