* Functional event scheduler - still some to do, but works

* WIP on message area cleanup via scheduler
* Some const cleanup
This commit is contained in:
Bryan Ashby 2016-06-19 21:09:45 -06:00
parent 3aa87432a1
commit 36ce2354e3
7 changed files with 427 additions and 67 deletions

View file

@ -211,16 +211,25 @@ function getDefaultConfig() {
archivers : {
zip : {
sig : "504b0304",
sig : '504b0304',
offset : 0,
compressCmd : "7z",
compressArgs : [ "a", "-tzip", "{archivePath}", "{fileList}" ],
decompressCmd : "7z",
decompressArgs : [ "e", "-o{extractPath}", "{archivePath}" ]
compressCmd : '7z',
compressArgs : [ 'a', '-tzip', '{archivePath}', '{fileList}' ],
decompressCmd : '7z',
decompressArgs : [ 'e', '-o{extractPath}', '{archivePath}' ]
}
},
messageAreaDefaults : {
//
// The following can be override per-area as well
//
maxMessages : 1024, // 0 = unlimited
maxAgeDays : 0, // 0 = unlimited
},
messageConferences : {
messageConferences : {
system_internal : {
name : 'System Internal',
desc : 'Built in conference for private messages, bulletins, etc.',
@ -256,6 +265,26 @@ function getDefaultConfig() {
bundleTargetByteSize : 2048000, // 2M, before creating another archive
}
},
eventScheduler : {
events : {
trimMessageAreas : {
// may optionally use [or ]@watch:/path/to/file
//schedule : 'every 24 hours after 3:30 am',
schedule : 'every 1 minutes',
// action:
// - @method:path/to/module.js:theMethodName
// (path is relative to engima base dir)
//
// - @execute:/path/to/something/executable.sh
//
action : '@method:core/message_area.js:trimMessageAreasScheduledEvent', // see method for avail args
}
}
},
misc : {
idleLogoutSeconds : 60 * 6, // 6m