you can separate the Redis connections and queue initialization for the worker thread and the main thread.