Skip to content

Commit

Permalink
feat(core): impl hot reload
Browse files Browse the repository at this point in the history
  • Loading branch information
HsiangNianian committed Jul 6, 2024
1 parent 71880e5 commit e44fe8d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions hrc/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ class Core:
_condition: (
asyncio.Condition
) # Condition used to handle get # pyright: ignore[reportUninitializedInstanceVariable]
_rule_tasks: Set[
"asyncio.Task[None]"
] # Adapter task collection, used to hold references to adapter tasks
_handle_event_tasks: Set[
"asyncio.Task[None]"
] # Event handling task, used to keep a reference to the adapter task

def __init__(
self,
Expand All @@ -85,7 +91,12 @@ def __init__(
self._restart_flag = False
self._module_path_finder = ModulePathFinder()
self.rules_priority_dict = defaultdict(list)
self._raw_config_dict = {}
self._rule_tasks = set()
self._handle_event_tasks = set()

self._extend_rules = []
self._extend_rule_dirs = []
self._core_run_hooks = []
self._core_exit_hooks = []
self._rule_enable_hooks = []
Expand Down

0 comments on commit e44fe8d

Please sign in to comment.