I built a little tokenizer in my app and it works great when called from the rails console. But once I run it from a background job (I tried both sidekiq and solid_queue) or from a server process (puma) with after_create_commit callback, it just hangs the process and I need to kill it.
It looks similar to this issue red-data-tools/pycall.rb#95