Skip to content

Commit

Permalink
fix: start auto loading policy for SyncedEnforcer
Browse files Browse the repository at this point in the history
Signed-off-by: jetz <[email protected]>
  • Loading branch information
jetz committed Jun 7, 2021
1 parent 05d8dfc commit 4724f7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion casbin/synced_enforcer.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def start_auto_load_policy(self, interval):
return
self._auto_loading.value = True
self._auto_loading_thread = threading.Thread(target=self._auto_load_policy, args=[interval], daemon=True)
self._auto_loading_thread.start()

def stop_auto_load_policy(self):
"""stops the thread started by start_auto_load_policy"""
Expand Down Expand Up @@ -577,4 +578,4 @@ def remove_named_grouping_policies(self,ptype,rules):
return self._e.remove_named_grouping_policies(ptype,rules)

def build_incremental_role_links(self, op, ptype, rules):
self.get_model().build_incremental_role_links(self.get_role_manager(), op, "g", ptype, rules)
self.get_model().build_incremental_role_links(self.get_role_manager(), op, "g", ptype, rules)

0 comments on commit 4724f7a

Please sign in to comment.