-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorporated feedback from Hackathon #261
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -67,7 +67,7 @@ Create [greetings_workflow.py](examples/helloworld/greetings_workflow.py) with t | |
```python | ||
from conductor.client.workflow.conductor_workflow import ConductorWorkflow | ||
from conductor.client.workflow.executor.workflow_executor import WorkflowExecutor | ||
from greetings import greet | ||
from greetings_worker import greet | ||
|
||
def greetings_workflow(workflow_executor: WorkflowExecutor) -> ConductorWorkflow: | ||
name = 'greetings' | ||
|
@@ -205,47 +205,6 @@ Navigate to the **Executions** tab to view the workflow execution. | |
|
||
Open the Workbench tab and try running the 'greetings' workflow. You will notice that the workflow execution fails. This is because the task_handler.stop_processes() [helloworld.py] function is called and stops all workers included in the app, and therefore, there is no worker up and running to execute the tasks. | ||
|
||
Now, let's update the app `helloworld.py` | ||
|
||
```python | ||
from conductor.client.automator.task_handler import TaskHandler | ||
from conductor.client.configuration.configuration import Configuration | ||
from conductor.client.workflow.conductor_workflow import ConductorWorkflow | ||
from conductor.client.workflow.executor.workflow_executor import WorkflowExecutor | ||
from greetings_workflow import greetings_workflow | ||
|
||
|
||
def register_workflow(workflow_executor: WorkflowExecutor) -> ConductorWorkflow: | ||
workflow = greetings_workflow(workflow_executor=workflow_executor) | ||
workflow.register(True) | ||
return workflow | ||
|
||
|
||
def main(): | ||
# points to http://localhost:8080/api by default | ||
api_config = Configuration() | ||
|
||
workflow_executor = WorkflowExecutor(configuration=api_config) | ||
|
||
# Needs to be done only when registering a workflow one-time | ||
# workflow = register_workflow(workflow_executor) | ||
|
||
task_handler = TaskHandler(configuration=api_config) | ||
task_handler.start_processes() | ||
|
||
# workflow_run = workflow_executor.execute(name=workflow.name, version=workflow.version, | ||
workflow_input={'name': 'World'}) | ||
|
||
# print(f'\nworkflow result: {workflow_run.output["result"]}\n') | ||
# print(f'see the workflow execution here: {api_config.ui_host}/execution/{workflow_run.workflow_id}\n') | ||
|
||
# task_handler.stop_processes() | ||
|
||
|
||
if __name__ == '__main__': | ||
main() | ||
``` | ||
|
||
By commenting the lines that execute the workflow and stop the task polling mechanism, we can re-run the app and run the workflow from the Conductor UI. The task is executed successfully. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please remove this line as well. |
||
|
||
## Running Workflows on Orkes Conductor | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you update this text as well?
The README should not focus on the hackathon audience but rather general purpose audience.