Return the nodename for this process (not a worker). This is used for e.g. the origin task message field.
(hostname: str | None = None, prefix: str = 'gen')
| 59 | |
| 60 | |
| 61 | def anon_nodename(hostname: str | None = None, prefix: str = 'gen') -> str: |
| 62 | """Return the nodename for this process (not a worker). |
| 63 | |
| 64 | This is used for e.g. the origin task message field. |
| 65 | """ |
| 66 | return nodename(''.join([prefix, str(os.getpid())]), hostname or gethostname()) |
| 67 | |
| 68 | |
| 69 | def nodesplit(name: str) -> tuple[None, str] | list[str]: |