pyl is passing
This commit is contained in:
parent
153e006ee1
commit
6873cc65ac
|
@ -2,6 +2,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import dataclasses
|
||||
import os
|
||||
from dataclasses import dataclass
|
||||
from dataclasses import field
|
||||
from typing import Any
|
||||
|
@ -10,8 +11,6 @@ import marshmallow
|
|||
from marshmallow import post_load
|
||||
from marshmallow import Schema
|
||||
|
||||
import os
|
||||
|
||||
from spiffworkflow_backend.models.process_model import ProcessModelInfo
|
||||
|
||||
|
||||
|
|
|
@ -33,15 +33,18 @@ class FileSystemService:
|
|||
|
||||
@staticmethod
|
||||
def id_string_to_relative_path(id_string: str) -> str:
|
||||
"""Id_string_to_relative_path."""
|
||||
return id_string.replace("/", os.sep)
|
||||
|
||||
@staticmethod
|
||||
def process_group_path(name: str) -> str:
|
||||
"""Category_path."""
|
||||
return os.path.abspath(os.path.join(
|
||||
FileSystemService.root_path(),
|
||||
FileSystemService.id_string_to_relative_path(name)
|
||||
))
|
||||
return os.path.abspath(
|
||||
os.path.join(
|
||||
FileSystemService.root_path(),
|
||||
FileSystemService.id_string_to_relative_path(name),
|
||||
)
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def full_path_from_relative_path(relative_path: str) -> str:
|
||||
|
|
|
@ -212,14 +212,16 @@ 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
|
||||
bpmn_task_type = record.task_type if hasattr(record, "task_type") else None
|
||||
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
|
||||
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
|
||||
current_user_id = (
|
||||
record.current_user_id if hasattr(record, "current_user_id") else None # type: ignore
|
||||
)
|
||||
spiff_step = (
|
||||
record.spiff_step
|
||||
if hasattr(record, "spiff_step") and record.spiff_step is not None
|
||||
record.spiff_step # type: ignore
|
||||
if hasattr(record, "spiff_step") and record.spiff_step is not None # type: ignore
|
||||
else 1
|
||||
)
|
||||
self.logs.append(
|
||||
|
|
|
@ -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()
|
||||
handler.bulk_insert_logs() # type: ignore
|
||||
db.session.commit()
|
||||
|
||||
except WorkflowTaskExecException as we:
|
||||
|
|
|
@ -213,7 +213,7 @@ class ProcessModelService(FileSystemService):
|
|||
process_group_path = os.path.abspath(
|
||||
os.path.join(
|
||||
FileSystemService.root_path(),
|
||||
FileSystemService.id_string_to_relative_path(process_group_id)
|
||||
FileSystemService.id_string_to_relative_path(process_group_id),
|
||||
)
|
||||
)
|
||||
if self.is_group(process_group_path):
|
||||
|
|
Loading…
Reference in New Issue