306:edefddec933d
Anton Shestakov <av6@dwimlabs.net>, Sun, 24 Sep 2017 12:25:05 +0800
viewer: use subqueries to get data on index page Before, there were bare columns in the aggregate query, their values were undefined (but it somehow worked), as SQLite docs say. Good news is that now this bigger query uses (project_id, ordinal) index and is really fast.

previous change 244:62252030324f

templates/atom.xml

Permissions: -rw-r--r--

Other formats: Feeds:
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<icon>{{ request.protocol }}://{{ request.host }}/static/favicon-cat.png</icon>
<title>{{ project.name }} feed</title>
<id>{{ project.get_url(request) }}/atom</id>
<link href="{{ project.get_url(request) }}/atom" rel="self"/>
<link href="{{ project.get_url(request) }}"/>
{% set last = checks.first() %}
{% if last %}
<updated>{{ last.finished.isoformat() }}Z</updated>
{% else %}
<updated>1970-01-01T08:00:00</updated>
{% end %}
{% for check in checks.limit(20) %}
<entry>
<title>Check #{{ check.ordinal }}: {{ status(check) }}</title>
<id>{{ project.get_url(request) }}/{{ check.ordinal }}</id>
<link href="{{ project.get_url(request) }}/{{ check.ordinal }}"/>
<updated>{{ check.finished.isoformat() }}Z</updated>
</entry>
{% end %}
</feed>