Commits

nick_cunningham committed 08864ed

Add refresh interval config option.

For pull request of:
https://bitbucket.org/aahmed/meat/issue/14/allow-adjustment-of-refresh-in-config

  • Participants
  • Parent commits aab0875

Comments (0)

Files changed (2)

lib/configTemplate.js

             like {resource}@resource.calendar.google.com
         */
     ,   "resourcesOnly" : true
+
+        /*
+            Interval for fetching new calendar events from Google Apps in seconds.
+            Values under 300 seconds may cause instability. Default is 10 minutes.
+        */
+    ,   "refreshPeriodSeconds" : 600
     }
 
     /* A secret used to identify legitimate users. This is not secure, it is only obscuring.

lib/gapps/datasource.js

 
 function Datasource(options) {
     this._loadedAny = false;
-    this._periodSeconds = defaultUpdateSeconds;
+    this._periodSeconds = options && options.refreshPeriodSeconds || defaultUpdateSeconds;
     this._rooms = [];
 
     this.logger = options && options.logger || require('winston');