-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support workflow status listener (#266)
- Loading branch information
Showing
4 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import time | ||
import uuid | ||
|
||
from conductor.client.configuration.configuration import Configuration | ||
from conductor.client.http.models import StartWorkflowRequest, RerunWorkflowRequest, TaskResult | ||
from conductor.client.orkes_clients import OrkesClients | ||
from conductor.client.workflow.conductor_workflow import ConductorWorkflow | ||
from conductor.client.workflow.executor.workflow_executor import WorkflowExecutor | ||
from conductor.client.workflow.task.http_task import HttpTask | ||
from conductor.client.workflow.task.wait_task import WaitTask | ||
|
||
|
||
def main(): | ||
api_config = Configuration() | ||
clients = OrkesClients(configuration=api_config) | ||
|
||
workflow = ConductorWorkflow(name='workflow_status_listener_demo', version=1, | ||
executor=clients.get_workflow_executor()) | ||
workflow >> HttpTask(task_ref_name='http_ref', http_input={ | ||
'uri': 'https://orkes-api-tester.orkesconductor.com/api' | ||
}) | ||
workflow.enable_status_listener('kafka:abcd') | ||
workflow.register(overwrite=True) | ||
print(f'Registered {workflow.name}') | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters