From a446628d455b7c9e30a08c0d64033ecd2ca7f5c0 Mon Sep 17 00:00:00 2001 From: Tim Brigham OC <75033503+timbrigham-oc@users.noreply.github.com> Date: Fri, 22 Aug 2025 16:30:36 -0400 Subject: [PATCH 1/3] Update app_svc.py Skip swap files created by nano while developing rules --- app/service/app_svc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/service/app_svc.py b/app/service/app_svc.py index ec831a3f8..ee8fb023f 100644 --- a/app/service/app_svc.py +++ b/app/service/app_svc.py @@ -207,6 +207,9 @@ async def watch_ability_files(self): files = (os.path.join(rt, fle) for rt, _, f in os.walk(p.data_dir+'/abilities') for fle in f if time.time() - os.stat(os.path.join(rt, fle)).st_mtime < int(self.get_config('ability_refresh'))) for f in files: + if f.endswith('.swp'): + self.log.debug('[%s] Skipping swap file %s' % (p.name, f)) + continue self.log.debug('[%s] Reloading %s' % (p.name, f)) await self.get_service('data_svc').load_ability_file(filename=f, access=p.access) await asyncio.sleep(int(self.get_config('ability_refresh'))) From 6c9e7064e5062a75164933e029e188f8dffbe4e6 Mon Sep 17 00:00:00 2001 From: Tim Brigham OC <75033503+timbrigham-oc@users.noreply.github.com> Date: Wed, 27 Aug 2025 15:08:44 -0400 Subject: [PATCH 2/3] Update app_svc.py Update logic to exclude all non yml files --- app/service/app_svc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/service/app_svc.py b/app/service/app_svc.py index ee8fb023f..0bb056515 100644 --- a/app/service/app_svc.py +++ b/app/service/app_svc.py @@ -207,8 +207,8 @@ async def watch_ability_files(self): files = (os.path.join(rt, fle) for rt, _, f in os.walk(p.data_dir+'/abilities') for fle in f if time.time() - os.stat(os.path.join(rt, fle)).st_mtime < int(self.get_config('ability_refresh'))) for f in files: - if f.endswith('.swp'): - self.log.debug('[%s] Skipping swap file %s' % (p.name, f)) + if not f.endswith('.yml'): + self.log.debug('[%s] Skipping non YML file %s' % (p.name, f)) continue self.log.debug('[%s] Reloading %s' % (p.name, f)) await self.get_service('data_svc').load_ability_file(filename=f, access=p.access) From a3495354b3f1a476c0c8a427030004774492c581 Mon Sep 17 00:00:00 2001 From: Daniel Matthews <58484522+uruwhy@users.noreply.github.com> Date: Fri, 9 Jan 2026 07:42:08 -0500 Subject: [PATCH 3/3] support both yaml file extensions --- app/service/app_svc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/service/app_svc.py b/app/service/app_svc.py index 0bb056515..8e3c87a4a 100644 --- a/app/service/app_svc.py +++ b/app/service/app_svc.py @@ -207,7 +207,7 @@ async def watch_ability_files(self): files = (os.path.join(rt, fle) for rt, _, f in os.walk(p.data_dir+'/abilities') for fle in f if time.time() - os.stat(os.path.join(rt, fle)).st_mtime < int(self.get_config('ability_refresh'))) for f in files: - if not f.endswith('.yml'): + if not f.endswith(('.yml', '.yaml')): self.log.debug('[%s] Skipping non YML file %s' % (p.name, f)) continue self.log.debug('[%s] Reloading %s' % (p.name, f))