init(baseline): import AIOS V1R1C0 multiuser gitops custom llm baseline
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
import sqlite3, pathlib, os
|
||||
root=pathlib.Path(os.environ.get('AIOS_WEBOPS_ROOT','.')); db=root/'data'/'webops.sqlite3'
|
||||
def send_owner_wechat(event_type,payload): print('[OWNER_WECHAT_NOTIFY]',event_type,payload)
|
||||
with sqlite3.connect(db) as con:
|
||||
con.row_factory=sqlite3.Row
|
||||
rs=con.execute("SELECT * FROM owner_notifications WHERE status='queued' ORDER BY created_at LIMIT 20").fetchall()
|
||||
for r in rs:
|
||||
send_owner_wechat(r['event_type'],r['payload'])
|
||||
con.execute("UPDATE owner_notifications SET status='sent',sent_at=datetime('now') WHERE id=?",(r['id'],))
|
||||
con.commit()
|
||||
print('OWNER_WECHAT_NOTIFY_WORKER_DONE', len(rs))
|
||||
Reference in New Issue
Block a user