mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-08-05 21:14:13 -04:00
don't know why some jobs were missing from the list, but with this change they all show up
This commit is contained in:
parent
b5f5581477
commit
416aa064f8
1 changed files with 2 additions and 2 deletions
|
@ -4,6 +4,7 @@ import json
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import importlib
|
import importlib
|
||||||
|
import rethinkdb
|
||||||
|
|
||||||
# XXX flask does its own logging config
|
# XXX flask does its own logging config
|
||||||
# import logging
|
# import logging
|
||||||
|
@ -102,8 +103,7 @@ def services():
|
||||||
|
|
||||||
@app.route("/api/jobs")
|
@app.route("/api/jobs")
|
||||||
def jobs():
|
def jobs():
|
||||||
jobs_ = list(r.table("jobs").run())
|
jobs_ = list(r.table("jobs").order_by(rethinkdb.desc("id")).run())
|
||||||
jobs_ = sorted(jobs_, key=lambda j: j['id'], reverse=True)
|
|
||||||
return flask.jsonify(jobs=jobs_)
|
return flask.jsonify(jobs=jobs_)
|
||||||
|
|
||||||
@app.route("/api/config")
|
@app.route("/api/config")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue