mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00
Make the varnish queue id configurable
This is required if the queue is dropped and recreated in pgq as it gets a new id, which needs to be used when viewing the current status of the queue in the admin interface.
This commit is contained in:
@ -206,7 +206,7 @@ def admin_purge(request):
|
||||
|
||||
# Fetch list of latest purges
|
||||
curs = connection.cursor()
|
||||
curs.execute("SELECT ev_time, ev_type, ev_data FROM pgq.event_1 WHERE ev_type IN ('P', 'X') ORDER BY ev_time DESC LIMIT 20")
|
||||
curs.execute("SELECT ev_time, ev_type, ev_data FROM pgq.event_%s WHERE ev_type IN ('P', 'X') ORDER BY ev_time DESC LIMIT 20" % settings.VARNISH_QUEUE_ID)
|
||||
latest = [{'t': r[0], 'ty': r[1], 'u': r[2]} for r in curs.fetchall()]
|
||||
|
||||
return render_to_response('core/admin_purge.html', {
|
||||
|
Reference in New Issue
Block a user