def job():
job_id = request.form.get('job_id', None)
date_path = request.form.get('date_path', None)
status = request.form.get('status', None)
# A job is starting, we want the date_path
if job_id and date_path:
query('UPDATE searches SET date_path = ? WHERE id = ?',
[date_path, job_id])
logging.debug('update date_path=%s where id=%s' % (date_path, job_id))
g.db.commit()
# A job is in progress, we want the status
if date_path and status:
query('UPDATE searches SET status = ? WHERE date_path = ?',
[status, date_path])
logging.debug('update status=%s where date_path=%s' % (status,
date_path))
g.db.commit()
return redirect(url_for('index'))
评论列表
文章目录