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) return os.path.join(app_root, "..", dir_name)
@staticmethod @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) return id_string.replace("/", os.sep)
@staticmethod @staticmethod

View File

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

View File

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

View File

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