Skip to content
Snippets Groups Projects
README.md 637 B
Newer Older
Guilhem Saurel's avatar
Guilhem Saurel committed
# Example 1

In this example, we have:
- one Manager that own a task Queue
Guilhem Saurel's avatar
Guilhem Saurel committed
- one Boss that pushes tasks in that Queue
Guilhem Saurel's avatar
Guilhem Saurel committed
- Minions that get things done
Guilhem Saurel's avatar
Guilhem Saurel committed

## Test  locally

In one shell: `./manager.py`
Guilhem Saurel's avatar
Guilhem Saurel committed
In another: `./boss.py`
Guilhem Saurel's avatar
Guilhem Saurel committed
And in many others: `./minion.py`

## Test on multiple computers

eg. if the manager is on senjosan:

```bash
Guilhem Saurel's avatar
Guilhem Saurel committed
docker build --build-arg HOST=senjosan -t memmos.laas.fr:5000/gepetto/multiprocessing-examples:example-1 .
Guilhem Saurel's avatar
Guilhem Saurel committed
docker push memmos.laas.fr:5000/gepetto/multiprocessing-examples:example-1
```

And on other computers:
```bash
Guilhem Saurel's avatar
Guilhem Saurel committed
docker run --rm -it memmos.laas.fr:5000/gepetto/multiprocessing-examples:example-1
Guilhem Saurel's avatar
Guilhem Saurel committed
```