broad (small) changes to make style of all routes and jobs to be consistent, e.g. use underscords between words
This commit is contained in:
22
job.py
22
job.py
@@ -236,12 +236,12 @@ def joblog(id):
|
||||
return render_template("joblog.html", job=joblog, logs=logs, duration=duration, display_more=display_more, order=order, estimate=estimate, refresh=refresh)
|
||||
|
||||
###############################################################################
|
||||
# /wakeup -> GET -> forces the job manager to wake up, and check the queue
|
||||
# /wake_up -> GET -> forces the job manager to wake up, and check the queue
|
||||
# should not be needed, but in DEV can be helpful
|
||||
################################################################################
|
||||
@app.route("/wakeup", methods=["GET"])
|
||||
@app.route("/wake_up", methods=["GET"])
|
||||
@login_required
|
||||
def wakeup():
|
||||
def wake_up():
|
||||
WakePAJobManager(job_id=None)
|
||||
return redirect("/")
|
||||
|
||||
@@ -317,12 +317,12 @@ def joblog_search():
|
||||
|
||||
|
||||
###############################################################################
|
||||
# / -> POST -> looks for pa_job_manager status to F/E jobs and sends json of
|
||||
# them back to F/E (called form internal/js/jobs.js:CheckForJobs()
|
||||
# /check_for_jobs -> POST -> looks for pa_job_manager status to F/E jobs and sends json of
|
||||
# them back to F/E called form internal/js/jobs.js:check_for_jobs()
|
||||
################################################################################
|
||||
@app.route("/checkforjobs", methods=["POST"])
|
||||
@app.route("/check_for_jobs", methods=["POST"])
|
||||
@login_required
|
||||
def CheckForJobs():
|
||||
def check_for_jobs():
|
||||
num=GetNumActiveJobs()
|
||||
sts=[]
|
||||
for msg in PA_JobManager_Message.query.all():
|
||||
@@ -333,12 +333,12 @@ def CheckForJobs():
|
||||
return make_response( jsonify( num_active_jobs=num, sts=sts ) )
|
||||
|
||||
###############################################################################
|
||||
# / -> POST -> looks for pa_job_manager status to F/E jobs and sends json of
|
||||
# them back to F/E (called form internal/js/jobs.js:CheckForJobs()
|
||||
# /clear_msg -> POST -> clears out a F/E message based on passed in <id>
|
||||
# called form internal/js/jobs.js:CheckForJobs()
|
||||
################################################################################
|
||||
@app.route("/clearmsg/<id>", methods=["POST"])
|
||||
@app.route("/clear_msg/<id>", methods=["POST"])
|
||||
@login_required
|
||||
def ClearMessage(id):
|
||||
def clear_message(id):
|
||||
PA_JobManager_Message.query.filter(PA_JobManager_Message.id==id).delete()
|
||||
db.session.commit()
|
||||
# no real need for this response, as if it succeeded/failed the F/E ignores it
|
||||
|
||||
Reference in New Issue
Block a user