mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-12-14 15:36:18 +00:00
Update PeerJobs.py
This commit is contained in:
@@ -191,7 +191,7 @@ class PeerJobs:
|
||||
for j in needToDelete:
|
||||
self.deleteJob(j)
|
||||
|
||||
def cleanJob(self):
|
||||
def cleanJob(self, init = False):
|
||||
failingJobs = self.JobLogger.getFailingJobs()
|
||||
with self.engine.begin() as conn:
|
||||
for job in failingJobs:
|
||||
@@ -204,6 +204,8 @@ class PeerJobs:
|
||||
)
|
||||
self.JobLogger.deleteLogs(JobID=job.get('JobID'))
|
||||
self.JobLogger.log(job.get('JobID'), Message=f"Job is removed due to being stale.")
|
||||
if init and conn.dialect.name == 'sqlite':
|
||||
conn.execute('VACUUM;')
|
||||
|
||||
def __runJob_Compare(self, x: float | datetime, y: float | datetime, operator: str):
|
||||
if operator == "eq":
|
||||
|
||||
Reference in New Issue
Block a user