Skip to content

Commit

Permalink
feature: AMQPWorker (#5)
Browse files Browse the repository at this point in the history
* feature: implement `AMQPWorker`
  • Loading branch information
ClemDoum authored Mar 22, 2024
1 parent a10227f commit d4ee96f
Show file tree
Hide file tree
Showing 21 changed files with 875 additions and 1,340 deletions.
6 changes: 2 additions & 4 deletions icij-worker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,8 @@ icij-worker workers start -c worker_config.json -n 2 --backend multiprocessing "

## Async worker implementations
### Implemented
- [`neo4j`](https://neo4j.com/docs/api/python-driver/current/): task

### In progress
- AMQP
- [`neo4j`](https://neo4j.com/docs/api/python-driver/current/): task
- [AMQP](https://www.amqp.org/) `0.9.1` based on [RabbitMQ](https://www.rabbitmq.com/)

## Worker asynchronous backends
### Implemented
Expand Down
3 changes: 1 addition & 2 deletions icij-worker/icij_worker/backend/mp.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,5 @@ def run_workers_with_multiprocessing(
for w_id, process_runner in worker_runners:
logger.info("starting worker %s", w_id)
tasks.append(process_runner())
first = tasks[0]
with _handle_pool_termination(pool, True):
first.get()
pass
2 changes: 1 addition & 1 deletion icij-worker/icij_worker/event_publisher/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
pass

try:
from .amqp import AMQPEventPublisher
from .amqp import AMQPPublisher
except ImportError:
pass
Loading

0 comments on commit d4ee96f

Please sign in to comment.