Open pradeepranwa1 opened 4 days ago
I am using mutiple gunicorn workers each workers creates its own enforcer and in memory data, equal number of watchers are created, but on change in db only a single watcher is triggered mutiple times .
INSTALLED_APPS += [ 'casbin_adapter.apps.CasbinAdapterConfig' ]
CASBIN_MODEL = os.path.join("finbox_dashboard/casbin_middleware/authz_model.conf") watcher = PostgresqlWatcher(host=BANK_CONNECT_APIS_PG_HOST_URL, port=BANK_CONNECT_APIS_PG_PORT, user=BANK_CONNECT_APIS_PG_USER, password=BANK_CONNECT_APIS_PG_PASSWORD, dbname=BANK_CONNECT_APIS_PG_DBNAME, channel_name=channel_name)
CASBIN_WATCHER = watcher
@techoner @Nekotoxin
sorry any one random watcher is triggered and in memory data of that one worker is updated, others workers still have older data
I am using mutiple gunicorn workers each workers creates its own enforcer and in memory data, equal number of watchers are created, but on change in db only a single watcher is triggered mutiple times .
INSTALLED_APPS += [ 'casbin_adapter.apps.CasbinAdapterConfig' ]
CASBIN_MODEL = os.path.join("finbox_dashboard/casbin_middleware/authz_model.conf") watcher = PostgresqlWatcher(host=BANK_CONNECT_APIS_PG_HOST_URL, port=BANK_CONNECT_APIS_PG_PORT, user=BANK_CONNECT_APIS_PG_USER, password=BANK_CONNECT_APIS_PG_PASSWORD, dbname=BANK_CONNECT_APIS_PG_DBNAME, channel_name=channel_name)
CASBIN_WATCHER = watcher