aiidateam / kiwipy

A python messaging library for RPC, task queues and broadcasts
https://kiwipy.readthedocs.io
Other
15 stars 4 forks source link

Bump aio pika to 8.1.8 #113

Closed unkcpz closed 1 year ago

unkcpz commented 1 year ago
codecov[bot] commented 1 year ago

Codecov Report

Merging #113 (8c9da20) into develop (0e7d02d) will decrease coverage by 2.34%. The diff coverage is 89.48%.

:exclamation: Current head 8c9da20 differs from pull request most recent head 1b530fe. Consider uploading reports for the commit 1b530fe to get more accurate results

@@             Coverage Diff             @@
##           develop     #113      +/-   ##
===========================================
- Coverage    90.32%   87.98%   -2.33%     
===========================================
  Files           16       16              
  Lines         1146     1156      +10     
===========================================
- Hits          1035     1017      -18     
- Misses         111      139      +28     
Impacted Files Coverage Δ
kiwipy/rmq/tasks.py 94.18% <83.34%> (-0.91%) :arrow_down:
kiwipy/rmq/threadcomms.py 84.89% <93.34%> (-8.90%) :arrow_down:
kiwipy/rmq/communicator.py 86.85% <100.00%> (-3.75%) :arrow_down:
kiwipy/rmq/messages.py 93.53% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

unkcpz commented 1 year ago

@muhrin could you have a look at these changes?

A critical change I am not confident in is that since _on_task is now made async, it can not be added to task outcome future by fut.add_done_callback. I tried to chain the callback with fut object but it create an extra reference to outcome which is conflicting with the idea of using weakref to trigger the requeue. If you prefer we can have a discussion, it is a bit hard to explain it since it is still vague to me how weakref works.

Also pinning @sphuber @chrisjsewell for comment.

unkcpz commented 1 year ago

Hi @muhrin, it's been so long that I think that probably better to set a quick meeting and check this together again. I am now successfully putting the _on_task_done as a coroutine and schedule it in the event loop. But when using the ThreadCommunicator this implementation comes up with a warning that coroutine call from another thread' and not able to execute.

sphuber commented 1 year ago

Superseded by #114