fix: reduce task startup overhead and lazy-load notifications

This commit is contained in:
whyour
2026-09-28 09:42:54 +08:00
parent f168efcdae
commit 7603702eca
7 changed files with 277 additions and 8 deletions
+4 -2
View File
@@ -129,10 +129,12 @@ try:
run()
from __ql_notify__ import send
class BaseApi(Client):
def notify(self, *args, **kwargs):
# Most scripts never send a notification. Python caches this
# module after the first call, including its channel dependencies.
from __ql_notify__ import send
return send(*args, **kwargs)
QLAPI = BaseApi()