commented out sleep which I use for testing of active jobs/job refresh page, and re-title the job list html

This commit is contained in:
2021-01-17 12:38:28 +11:00
parent 2b9dedb9b9
commit 507336c2b2
2 changed files with 4 additions and 3 deletions

4
job.py
View File

@@ -20,7 +20,7 @@ class Joblog(db.Model):
return "<id: {}, job_id: {}, log: {}".format(self.id, self.job_id, self.log )
################################################################################
# Class describing Action in the database, and via sqlalchemy, connected to the DB as well
# Class describing Job in the database, and via sqlalchemy, connected to the DB as well
################################################################################
class Job(db.Model):
id = db.Column(db.Integer, db.Sequence('joblog_id_seq'), primary_key=True )
@@ -74,7 +74,7 @@ def NewJob(name, num_passes="1", num_files="0", wait_for=None ):
################################################################################
@app.route("/jobs", methods=["GET"])
def jobs():
page_title='Job actions'
page_title='Job list'
jobs = Job.query.all()
return render_template("jobs.html", jobs=jobs, page_title=page_title)

View File

@@ -171,7 +171,8 @@ class FileData():
AddLogForJob(job, "Found new file: {}".format(fname) )
else:
AddLogForJob(job, "DEBUG: {} - {} is OLDER than {}".format( file, stat.st_ctime, last_import_date ), file )
time.sleep(0.4)
# include this for making the job be a bit slower, and # allowing testing of active jobs/job refresh page, etc.
# time.sleep(0.4)
settings.last_import_date = time.time()
session.commit()
return self