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?
Ok, I think this may be an issue only on mac. Could be related to objc[54401]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. · Issue #1418 · rq/rq · GitHub
If you use mac you’ll have to add this in your bashrc/zshrc
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
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.