Closed epruesse closed 5 years ago
Looks like Python 2.7 on Windows does not like this for whatever reason.
I am assuming that the error on win32/py2k is normal then, or rather, caused by something other than my patch?
ignore the winbuild
In that case the if sys.platform
can go. Not sure if it's necessary, triggers only in the jobs that fail anyway. Do delete it or do I create another PR?
you can come with another pr
See #276
The
sys.exit()
wrapping inpool.Worker.__call__
does not passstatus
tosys.exit(arg)
. This is an issue with 3rd party libs that usesys.exit(message)
for fatal conditions.E.g.:
This will log
"I cannot go on"
and pass it for handling as long as we are not inside of a celery worker. Inside of a worker, it will log""
.It might be arguable whether using
sys.exit()
in such a way is good design, but since this use is even suggested by the Python documentation, and since there is often no choice or control over 3rd party libs, it's something to live with.The patch is intentionally minimal. I'm not certain exactly what's going on at that point in the code, and "fork" points are always finicky across platforms. So while I don't quite understand why
sys.exit()
needs to be patched in the first place, I've just passed the parameter on so it can be caught by tasks.