
For now it returns total post count and disk usage. To reduce stress on the file system, the disk usage is cached for an hour.
6 lines
144 B
Python
6 lines
144 B
Python
import sqlalchemy
|
|
from szurubooru import db
|
|
|
|
def get_post_count():
|
|
return db.session.query(sqlalchemy.func.count(db.Post.post_id)).one()[0]
|