Add username and orgname to the config object instead of pass them to every object

This commit is contained in:
Mario de Frutos
2016-01-21 18:03:23 +01:00
parent 7c3ab87b78
commit 4d0cabb429
4 changed files with 25 additions and 11 deletions

View File

@@ -11,7 +11,7 @@ RETURNS Geometry AS $$
user_geocoder_config = GD["user_geocoder_config_{0}".format(username)]
# -- Check the quota
quota_service = quota_service.QuotaService(user_geocoder_config, redis_conn, username, orgname)
quota_service = quota_service.QuotaService(user_geocoder_config, redis_conn)
if not quota_service.check_user_quota():
plpy.error('You have reach the limit of your quota')