(workflow_id: int, project_id: int)
| 15 | logger = get_shared_logger() |
| 16 | |
| 17 | def trigger_workflow(workflow_id: int, project_id: int): |
| 18 | with session_scope_threaded() as session: |
| 19 | workflow = Workflow.get(session = session, workflow_id = workflow_id) |
| 20 | msg = { |
| 21 | 'workflow_id': workflow_id, |
| 22 | 'member_id': workflow.member_created_id, |
| 23 | 'kind': 'time_trigger', |
| 24 | 'project_id': project_id, |
| 25 | 'action_id': None |
| 26 | } |
| 27 | queueclient = QueueClient() |
| 28 | logger.debug(f"Triggering Workflow {workflow_id}...") |
| 29 | queueclient.send_message(message = msg, |
| 30 | routing_key = RoutingKeys.action_trigger_event_new.value, |
| 31 | exchange = Exchanges.actions.value) |
| 32 | |
| 33 | class SchedulerConsumer: |
| 34 |
nothing calls this directly
no test coverage detected