# HG changeset patch # User Paul Boddie # Date 1461274914 -7200 # Node ID a82971fddeab7ddaa2bff521d76312022cea214e # Parent 649c0b1cc0fd722c5abd39a099645d30ef444abb Added database-related notes for defining quota-related information. diff -r 649c0b1cc0fd -r a82971fddeab docs/wiki/Resources --- a/docs/wiki/Resources Thu Apr 21 23:20:57 2016 +0200 +++ b/docs/wiki/Resources Thu Apr 21 23:41:54 2016 +0200 @@ -372,7 +372,8 @@ ==== Initialising Quotas ==== -Within the journal storage area (described in the [[../FilesystemUsage|filesystem guide]]), +Within the journal storage area (described in the +[[../FilesystemUsage|filesystem guide]] and [[../DatabaseStore|database guide]]), a quota group directory must be initialised with a `limits` file indicating the amount of time that can be occupied by the cumulative total of all events scheduled by an individual user or a group of which they are a member. For @@ -395,6 +396,35 @@ particular user will be unable to reserve the resource unless defined as a member of a group listed in the `limits` file, as described below. +{{{{#!wiki tip +In a deployment using the [[../FileStore|file store]], files as described +above and below hold mappings and definitions in the given format. In a +deployment using the [[../DatabaseStore|database store]], database tables +hold such mappings with each column dedicated to a particular kind of +information. + +The examples here can be transcribed by just taking each +element and putting it in the appropriate column within a table, making +sure to set the `quota` column to indicate which quota is involved. For +example, to set the above limits in PostgreSQL, the following operations +may be used: + +{{{ +insert into quota_limits (quota, user_group, quota_limit) values ( + 'mailto:resource-car-cadillac@example.com', + 'mailto:vincent.vole@example.com', + 'PT10H'); +insert into quota_limits (quota, user_group, quota_limit) values ( + 'mailto:resource-car-cadillac@example.com', + '*', + 'PT10H'); +}}} + +Here, the `quota` column is set to `mailto:resource-car-cadillac@example.com`. +In a file-based journal, the equivalent `limits` file would be placed within a +quota directory having the name `mailto:resource-car-cadillac@example.com`. +}}}} + ==== Sharing Quotas Across Users ==== When the use of resources is to be shared between users in such a way that