It sounds like your code might be hanging.
If you are using multiple workers on a Windows machine, you would have to use the if-clause guard as described here 2.
Let me know, if that helps or if this is unrelated to your issue.