feat: openclaw-style secrets (env.vars + \) and per-task model routing
- Replace python-dotenv with config.json env.vars block + \ substitution - Add models section for per-task model routing (heartbeat, subagent, default) - Heartbeat/subagent tasks can use different models/providers than main chat - Remove python-dotenv from dependencies - Update all docs to reflect new config approach - Reorganize docs into project/ and research/ subdirectories
This commit is contained in:
@@ -147,6 +147,22 @@ class JobStore:
|
||||
conn.commit()
|
||||
return cursor.rowcount
|
||||
|
||||
def remove_by_channel_type(self, channel_type: str) -> list[str]:
|
||||
"""Remove all jobs with the given channel_type. Returns removed IDs."""
|
||||
with self._conn() as conn:
|
||||
rows = conn.execute(
|
||||
"SELECT id FROM jobs WHERE channel_type = ?", (channel_type,)
|
||||
).fetchall()
|
||||
ids = [row["id"] for row in rows]
|
||||
if ids:
|
||||
conn.execute(
|
||||
"DELETE FROM jobs WHERE channel_type = ?", (channel_type,)
|
||||
)
|
||||
conn.commit()
|
||||
if ids:
|
||||
logger.info(f"Removed {len(ids)} jobs with channel_type={channel_type}")
|
||||
return ids
|
||||
|
||||
@staticmethod
|
||||
def _row_to_job(row: sqlite3.Row) -> ScheduledJob:
|
||||
return ScheduledJob(
|
||||
|
||||
Reference in New Issue
Block a user