Speed things up.

If we want to go further than this we should change podop's incr(), pass
the flags and make admin process the results.
main
Florent Daigniere 2 years ago
parent 96d9289630
commit c1f571a4c3

@ -27,9 +27,9 @@ def dovecot_userdb_dict_list():
@internal.route("/dovecot/userdb/<path:user_email>") @internal.route("/dovecot/userdb/<path:user_email>")
def dovecot_userdb_dict(user_email): def dovecot_userdb_dict(user_email):
user = models.User.query.get(user_email) or flask.abort(404) quota = models.User.query.filter(models.User.email==email).with_entities(models.User.quota_bytes).one_or_none() or flask.abort(404)
return flask.jsonify({ return flask.jsonify({
"quota_rule": "*:bytes={}".format(user.quota_bytes) "quota_rule": "*:bytes="+quota[0])
}) })

Loading…
Cancel
Save