mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-12-17 00:46:19 +00:00
Update
This commit is contained in:
@@ -92,4 +92,9 @@ class PeerJobLogger:
|
|||||||
(self.jobLogTable.c.JobID == JobID if JobID is not None else True),
|
(self.jobLogTable.c.JobID == JobID if JobID is not None else True),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def vacuum(self):
|
||||||
|
with self.engine.begin() as conn:
|
||||||
|
if conn.dialect.name == 'sqlite':
|
||||||
|
conn.execute('VACUUM;')
|
||||||
@@ -205,6 +205,8 @@ class PeerJobs:
|
|||||||
self.JobLogger.deleteLogs(JobID=job.get('JobID'))
|
self.JobLogger.deleteLogs(JobID=job.get('JobID'))
|
||||||
self.JobLogger.log(job.get('JobID'), Message=f"Job is removed due to being stale.")
|
self.JobLogger.log(job.get('JobID'), Message=f"Job is removed due to being stale.")
|
||||||
if init and conn.dialect.name == 'sqlite':
|
if init and conn.dialect.name == 'sqlite':
|
||||||
|
print("[WGDashboard] SQLite Vacuuming...")
|
||||||
|
self.JobLogger.vacuum()
|
||||||
conn.execute('VACUUM;')
|
conn.execute('VACUUM;')
|
||||||
|
|
||||||
def __runJob_Compare(self, x: float | datetime, y: float | datetime, operator: str):
|
def __runJob_Compare(self, x: float | datetime, y: float | datetime, operator: str):
|
||||||
|
|||||||
Reference in New Issue
Block a user