mirror of
https://github.com/whyour/qinglong.git
synced 2026-10-01 05:13:50 +08:00
fix: reduce task startup overhead and lazy-load notifications
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user