Skip to content

Commit

Permalink
Fix RabbitMQ output path (#1756)
Browse files Browse the repository at this point in the history
The examples in `examples/developer_guide/2_2_rabbitmq` and `4_rabbitmq_cpp_stage` do not generate output files to `$MORPHEUS_ROOT` when following the README guidance. Change the output path to the root of repo to be consistent with other examples.

Closes #1754

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/nv-morpheus/Morpheus/blob/main/docs/source/developer_guide/contributing.md).
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.

Authors:
  - Yuchen Zhang (https://github.com/yczhang-nv)

Approvers:
  - David Gardner (https://github.com/dagardner-nv)

URL: #1756
  • Loading branch information
yczhang-nv authored Jun 24, 2024
1 parent 7133977 commit 00aa144
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/developer_guide/2_2_rabbitmq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ In a second terminal from the root of the Morpheus repo execute:
python examples/developer_guide/2_2_rabbitmq/read_simple.py
```

This will read from a RabbitMQ exchange named 'logs', and write the results to `/tmp/results.json`.
This will read from a RabbitMQ exchange named 'logs', and write the results to `results.json`.

If no exchange named 'logs' exists in RabbitMQ it will be created. By default the `read_simple.py` script will utilize the class-based `RabbitMQSourceStage`, alternately using the `--use_source_function` flag will utilize the function-based `rabbitmq_source` stage.

Expand All @@ -64,7 +64,7 @@ morpheus --log_level=INFO --plugin examples/developer_guide/2_2_rabbitmq/rabbitm
run pipeline-other \
from-rabbitmq --host=localhost --exchange=logs \
monitor \
to-file --filename=/tmp/results.json --overwrite
to-file --filename=results.json --overwrite
```

### Write Pipeline
Expand Down
2 changes: 1 addition & 1 deletion examples/developer_guide/2_2_rabbitmq/read_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def run_pipeline(use_source_function: bool):
pipeline.add_stage(MonitorStage(config))

# Write the to the output file
pipeline.add_stage(WriteToFileStage(config, filename='/tmp/results.json', file_type=FileTypes.JSON, overwrite=True))
pipeline.add_stage(WriteToFileStage(config, filename='results.json', file_type=FileTypes.JSON, overwrite=True))

# Run the pipeline
pipeline.run()
Expand Down
2 changes: 1 addition & 1 deletion examples/developer_guide/4_rabbitmq_cpp_stage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ In a second terminal from the root of the Morpheus repo execute:
python examples/developer_guide/4_rabbitmq_cpp_stage/src/read_simple.py
```

This will read from a RabbitMQ exchange named 'logs', and write the results to `/tmp/results.json`.
This will read from a RabbitMQ exchange named 'logs', and write the results to `results.json`.

If no exchange named 'logs' exists in RabbitMQ it will be created.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def run_pipeline(use_cpp, num_threads):
pipeline.add_stage(MonitorStage(config))

# Write the to the output file
pipeline.add_stage(WriteToFileStage(config, filename='/tmp/results.json', file_type=FileTypes.JSON, overwrite=True))
pipeline.add_stage(WriteToFileStage(config, filename='results.json', file_type=FileTypes.JSON, overwrite=True))

# Run the pipeline
pipeline.run()
Expand Down

0 comments on commit 00aa144

Please sign in to comment.