44from flask import Flask , abort , request
55
66from const import GithubHeaders , LOGGING_CONFIG
7- from utils import get_message , parse_datetime
7+ from utils import parse_datetime
88
99dictConfig (LOGGING_CONFIG )
1010
@@ -45,7 +45,10 @@ def process_workflow_job():
4545 if action == "queued" :
4646 # add to memory as timestamp
4747 jobs [job_id ] = int (time_start .timestamp ())
48- msg = get_message (action , repository , job_id , workflow )
48+ msg = (
49+ f"action={ action } repository={ repository } job_id={ job_id } "
50+ f' workflow="{ workflow } "'
51+ )
4952
5053 elif action == "in_progress" :
5154 job_requested = jobs .get (job_id )
@@ -54,7 +57,10 @@ def process_workflow_job():
5457 time_to_start = 0
5558 else :
5659 time_to_start = (time_start - datetime .fromtimestamp (job_requested )).seconds
57- msg = get_message (action , repository , job_id , time_to_start , workflow )
60+ msg = (
61+ f"action={ action } repository={ repository } job_id={ job_id } "
62+ f' workflow="{ workflow } " time_to_start={ time_to_start } '
63+ )
5864
5965 elif action == "completed" :
6066 job_requested = jobs .get (job_id )
@@ -67,7 +73,10 @@ def process_workflow_job():
6773 ).seconds
6874 # delete from memory
6975 del jobs [job_id ]
70- msg = get_message (action , repository , job_id , time_to_finish , workflow )
76+ msg = (
77+ f"action={ action } repository={ repository } job_id={ job_id } "
78+ f' workflow="{ workflow } " time_to_finish={ time_to_finish } '
79+ )
7180 else :
7281 app .logger .warning (f"Unknown action { action } , removing from memory" )
7382 if job_id in jobs :
0 commit comments