SIENTIAPDE-1314
Refactor workflow calls to use subworkflow naming convention for load_notification_package and process_notifications in alerts and reports modules. Update corresponding tests to reflect these changes.
This commit is contained in:
@@ -67,7 +67,9 @@ class Alerts:
|
||||
# Call subworkflow "load_notification_package" passing the static filters
|
||||
# (level = "ERROR" and timestamp > last timestamp)
|
||||
|
||||
package = await workflow.execute_child_workflow('load_notification_package', input_data)
|
||||
package = await workflow.execute_child_workflow(
|
||||
'subworkflow.load_notification_package', input_data
|
||||
)
|
||||
|
||||
if not package['notification_package'] or not package['sending_configs']:
|
||||
return
|
||||
@@ -92,7 +94,7 @@ class Alerts:
|
||||
|
||||
# Call subworkflow "process_notifications" passing the notification package
|
||||
log_report = await workflow.execute_child_workflow(
|
||||
'process_notifications',
|
||||
'subworkflow.process_notifications',
|
||||
{
|
||||
'metadata': metadata,
|
||||
'mail_type': mail_type,
|
||||
|
||||
@@ -59,7 +59,9 @@ class Reports:
|
||||
# Call subworkflow "load_notification_package" passing the static filters
|
||||
# (timestamp > last timestamp)
|
||||
|
||||
package = await workflow.execute_child_workflow('load_notification_package', input_data)
|
||||
package = await workflow.execute_child_workflow(
|
||||
'subworkflow.load_notification_package', input_data
|
||||
)
|
||||
|
||||
if not package['notification_package'] or not package['sending_configs']:
|
||||
return
|
||||
@@ -83,7 +85,7 @@ class Reports:
|
||||
|
||||
# Call subworkflow "process_notifications" passing the notification package
|
||||
await workflow.execute_child_workflow(
|
||||
'process_notifications',
|
||||
'subworkflow.process_notifications',
|
||||
{
|
||||
'metadata': metadata,
|
||||
'mail_type': mail_type,
|
||||
|
||||
@@ -9,7 +9,7 @@ with workflow.unsafe.imports_passed_through():
|
||||
from orchestrator.activities.activities import Activities
|
||||
|
||||
|
||||
@workflow.defn(name='load_notification_package')
|
||||
@workflow.defn(name='subworkflow.load_notification_package')
|
||||
class LoadNotificationPackage:
|
||||
"""
|
||||
Subworkflow for loading notification data and configuration.
|
||||
|
||||
@@ -10,7 +10,7 @@ with workflow.unsafe.imports_passed_through():
|
||||
from orchestrator.activities.activities import Activities
|
||||
|
||||
|
||||
@workflow.defn(name='process_notifications')
|
||||
@workflow.defn(name='subworkflow.process_notifications')
|
||||
class ProcessNotifications:
|
||||
"""
|
||||
Subworkflow for processing and sending notification emails.
|
||||
|
||||
Reference in New Issue
Block a user