Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 2

How do I run commands concurrently?

Solved! Go to Solution.

I have a project uses interprocess-communication using RabbitMQ.

I want to run rabbitmq in one shell and consumer and publisher in separate instances.

For example:

1. rabbitmq-server

2. While that rabbitmq-server is running, I want to run a python service `python3 receiver.py` in another separate shell

3. In another instance I want to be able to run another service `python3 sender.py` and `python3 passive_sender.py`

 

Sorry I'm new to creating pipelines and workflows.

1 Reply
Highlighted
Solution
GitHub Staff
Message 2 of 2

Re: How do I run commands concurrently?

It sounds like you might want to run the server in the background?  The `&` symbol at the end of a command in bash will run the command in the background.  For example, to run rabbitmq-server in the background, and the receiver _also_ in the background, and then run (blocking) on the sender:

 

- run: |

    rabbitmq-server &

    python3 receiver.py &

    python3 sender.py