housekeep: define filters in their own modules

This patch cleans up aurweb.templates and removes direct
module-level initialization of the environment.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2022-01-18 03:06:17 -08:00
parent fca175ed84
commit 211ca5e49c
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
16 changed files with 159 additions and 159 deletions

View file

@ -31,7 +31,7 @@ from sqlalchemy import literal, orm
import aurweb.config
from aurweb import db, logging, models, util
from aurweb import db, filters, logging, models, util
from aurweb.benchmark import Benchmark
from aurweb.models import Package, PackageBase, User
@ -264,7 +264,7 @@ def _main():
with gzip.open(USERS, "wt") as f:
f.writelines([f"{user.Username}\n" for i, user in enumerate(query)])
seconds = util.number_format(bench.end(), 4)
seconds = filters.number_format(bench.end(), 4)
logger.info(f"Completed in {seconds} seconds.")