If rq workers have overlapping names the compiler container dies
jetpacktuxedo opened this issue · comments
Example:
qmk_compiler_1 | Traceback (most recent call last):
qmk_compiler_1 | File "/usr/local/bin/rq", line 11, in <module>
qmk_compiler_1 | sys.exit(main())
qmk_compiler_1 | File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 764, in __call__
qmk_compiler_1 | return self.main(*args, **kwargs)
qmk_compiler_1 | File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 717, in main
qmk_compiler_1 | rv = self.invoke(ctx)
qmk_compiler_1 | File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1137, in invoke
qmk_compiler_1 | return _process_result(sub_ctx.command.invoke(sub_ctx))
qmk_compiler_1 | File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 956, in invoke
qmk_compiler_1 | return ctx.invoke(self.callback, **ctx.params)
qmk_compiler_1 | File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 555, in invoke
qmk_compiler_1 | return callback(*args, **kwargs)
qmk_compiler_1 | File "/usr/local/lib/python3.5/dist-packages/rq/cli/cli.py", line 75, in wrapper
qmk_compiler_1 | return ctx.invoke(func, cli_config, *args[1:], **kwargs)
qmk_compiler_1 | File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 555, in invoke
qmk_compiler_1 | return callback(*args, **kwargs)
qmk_compiler_1 | File "/usr/local/lib/python3.5/dist-packages/rq/cli/cli.py", line 236, in worker
qmk_compiler_1 | worker.work(burst=burst, logging_level=logging_level)
qmk_compiler_1 | File "/usr/local/lib/python3.5/dist-packages/rq/worker.py", line 466, in work
qmk_compiler_1 | self.register_birth()
qmk_compiler_1 | File "/usr/local/lib/python3.5/dist-packages/rq/worker.py", line 276, in register_birth
qmk_compiler_1 | raise ValueError(msg.format(self.name))
qmk_compiler_1 | ValueError: There exists an active worker named '4fd5a8e9ed53.8' already
There is probably an elegant way to handle this, but idk what that would be.
On discord @skullydazed suggested "we could generate a random name every time and pass -n"
I think newer versions of rq avoid this problem.