1

I am trying to run an async task with LaunchDarkly feature flags

When I first starting the worker, it takes the last flag value

But if I'm changing the feature flag value while worker is running - it will not update the value, and it will remain the same

When I'm running celery with -P gevent the problem seems to be solved, but we are running in context of only single process

gCoh
  • 2,719
  • 1
  • 22
  • 46

1 Answers1

1

We solved the issue by setting the client locally for each worker:

client = None

@worker_process_init.connect
def configure_worker(signal=None, sender=None, **kwargs):
    global client
    client = ldclient.get()
gCoh
  • 2,719
  • 1
  • 22
  • 46