mirror of
https://github.com/resf/distro-tools.git
synced 2024-11-22 13:11:28 +00:00
25 lines
580 B
Python
25 lines
580 B
Python
|
import datetime
|
||
|
|
||
|
from temporalio import workflow
|
||
|
|
||
|
|
||
|
@workflow.defn
|
||
|
class PollRHAdvisoriesWorkflow:
|
||
|
"""
|
||
|
Polls Red Hat Errata for new advisories.
|
||
|
"""
|
||
|
@workflow.run
|
||
|
async def run(self) -> None:
|
||
|
from_timestamp = await workflow.execute_activity(
|
||
|
"get_last_indexed_date",
|
||
|
start_to_close_timeout=datetime.timedelta(seconds=20),
|
||
|
)
|
||
|
|
||
|
await workflow.execute_activity(
|
||
|
"get_rh_advisories",
|
||
|
from_timestamp,
|
||
|
start_to_close_timeout=datetime.timedelta(hours=2),
|
||
|
)
|
||
|
|
||
|
return None
|