mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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:
parent
fca175ed84
commit
211ca5e49c
16 changed files with 159 additions and 159 deletions
|
@ -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.")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue