I have a setup where I use celery with concurrency. There is a variable defined in the module for db connection pooling. The problem is that celery's concurrency makes each process access that variable. Is there any way to make a process-level variable? # this dict available for all processes of celery worker # however my goal is to cache connection on process level db_connection_pool = {} def get_connection(some_id): if conn := db_connection_pool.get(some_id): return conn conn, some_id = create_connection() db_connection_pool[some_id] = conn return conn Continue reading...