mirror of
https://github.com/YosysHQ/sby.git
synced 2025-10-07 10:11:57 +00:00
Intertask cancellation via database
Task checking via database rated limited to once every 10s. Rename killer.sby to cancelledby.sby and add Makefile for testing.
This commit is contained in:
parent
e7c756a43f
commit
5fc8df43f8
4 changed files with 49 additions and 6 deletions
|
@ -295,6 +295,18 @@ class SbyStatusDb:
|
|||
|
||||
return {row["id"]: dict(row) for row in rows}
|
||||
|
||||
def all_tasks_status(self):
|
||||
rows = self.db.execute(
|
||||
"""
|
||||
SELECT task.id, task.name, task.created,
|
||||
task_status.status, task_status.created as 'status_created'
|
||||
FROM task
|
||||
INNER JOIN task_status ON task_status.task=task.id
|
||||
"""
|
||||
).fetchall()
|
||||
|
||||
return {row["id"]: dict(row) for row in rows}
|
||||
|
||||
def all_task_properties(self):
|
||||
rows = self.db.execute(
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue