BE: mylog() better code radability

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2025-11-25 07:54:17 +11:00
parent fa9fc2c8e3
commit 139447b253
26 changed files with 95 additions and 431 deletions

View File

@@ -29,10 +29,7 @@ class UpdateFieldAction(Action):
self.db = db
def execute(self):
mylog(
"verbose",
f"[WF] Updating field '{self.field}' to '{self.value}' for event object {self.trigger.object_type}",
)
mylog("verbose", f"[WF] Updating field '{self.field}' to '{self.value}' for event object {self.trigger.object_type}")
obj = self.trigger.object
@@ -109,12 +106,7 @@ class RunPluginAction(Action):
def execute(self):
obj = self.trigger.object
mylog(
"verbose",
[
f"Executing plugin '{self.plugin_name}' with parameters {self.params} for object {obj}"
],
)
mylog("verbose", f"Executing plugin '{self.plugin_name}' with parameters {self.params} for object {obj}")
# PluginManager.run(self.plugin_name, self.parameters)
return obj
@@ -129,12 +121,7 @@ class SendNotificationAction(Action):
def execute(self):
obj = self.trigger.object
mylog(
"verbose",
[
f"Sending notification via '{self.method}': {self.message} for object {obj}"
],
)
mylog("verbose", f"Sending notification via '{self.method}': {self.message} for object {obj}")
# NotificationManager.send(self.method, self.message)
return obj