forked from goodboy/tractor
1
0
Fork 0

Merge pull request #154 from goodboy/matrix

Add matrix room link
clean_log_header
goodboy 2020-09-24 13:05:35 -04:00 committed by GitHub
commit ce5c52905d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -47,11 +47,14 @@ No PyPi release yet!
Feel like saying hi? Feel like saying hi?
-------------------- --------------------
This project is very much coupled to the ongoing development of This project is very much coupled to the ongoing development of
``trio`` (i.e. ``tractor`` gets all its ideas from that brilliant ``trio`` (i.e. ``tractor`` gets most of its ideas from that brilliant
community). If you want to help, have suggestions or just want to community). If you want to help, have suggestions or just want to
say hi, please feel free to ping me on the `trio gitter channel`_! say hi, please feel free to reach us on in our `matrix channel`_. If
matrix seems too hip, we're also mostly all in the the `trio gitter
channel`_!
.. _trio gitter channel: https://gitter.im/python-trio/general .. _trio gitter channel: https://gitter.im/python-trio/general
.. _matrix channel: https://matrix.to/#/!tractor:matrix.org
.. |travis| image:: https://img.shields.io/travis/goodboy/tractor/master.svg .. |travis| image:: https://img.shields.io/travis/goodboy/tractor/master.svg

View File

@ -193,7 +193,7 @@ def pub(
topics: Set[str], topics: Set[str],
*args, *args,
# *, # *,
task_name: str = None, task_name: str = None, # default: only one task allocated
packetizer: Callable = None, packetizer: Callable = None,
**kwargs, **kwargs,
): ):
@ -202,6 +202,7 @@ def pub(
f"{agen} must be called with a `task_name` named " f"{agen} must be called with a `task_name` named "
f"argument with a falue from {tasks}") f"argument with a falue from {tasks}")
topics = set(topics)
ss = current_actor().statespace ss = current_actor().statespace
lockmap = ss.setdefault('_pubtask2lock', task2lock) lockmap = ss.setdefault('_pubtask2lock', task2lock)
lock = lockmap[task_name] lock = lockmap[task_name]