Enqueued job fails silently when there is an api call, like using requests.get(). Exception in rq-job is as below
Work-horse was terminated unexpectedly (waitpid returned 6)
Anyone used requests in a background job or know what causes this error?
If you use mac you’ll have to add this in your bashrc/zshrc
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
1 Like
Excellent!. That worked…
To add, it’s not just requests that has a problem, but other things like trying to create temp files etc also causes rq roker to be killed, without the above setting for OBJC_DISABLE_INITIALIZE_FORK_SAFETY.