-
-
Notifications
You must be signed in to change notification settings - Fork 356
Description
Issues
GitHub issues are for bugs. If you have questions, please ask them on the mailing list.
Checklist
- Does your title concisely summarize the problem?
- Did you include a minimal, reproducible example?
- What OS are you using?
- What version of Dramatiq are you using?
- What did you do?
- What did you expect would happen?
- What happened?
Creating two func decorated with @actor without setting its actor_name in different module, import the first registered func and send message to run, and you may find that dramatiq run the second but not the first func...
It seems dramatiq recognize func defaultly by its func name...
In many cases, the function names in different modules are set to the same. I think that it is an unreasonable design to use the function name as the only index.
Line 258 in 4b6ad18
| actor_name = actor_name or fn.__name__ |
Should we change the default actor_name to actor_name = actor_name or f'{fn.__module__}.{fn.__name__}'?
I am not familiar with the source code. Based on my initial understanding, it seems that actor_name is only used as the key of the destination function and can be set at will without duplication.