diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/event.inc.php | 4 | ||||
-rw-r--r-- | inc/property.inc.php | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/inc/event.inc.php b/inc/event.inc.php index 7a7c48b0..89e68650 100644 --- a/inc/event.inc.php +++ b/inc/event.inc.php @@ -20,6 +20,10 @@ class Event EventLog::info('System boot...'); $everythingFine = true; + // Delete job entries that might have been running when system rebooted + Property::clearList('cron.key.status'); + Property::clearList('cron.key.blocked'); + // Tasks: fire away $mountId = Trigger::mount(); $autoIp = Trigger::autoUpdateServerIp(); diff --git a/inc/property.inc.php b/inc/property.inc.php index b33e1bff..0b4ea7b3 100644 --- a/inc/property.inc.php +++ b/inc/property.inc.php @@ -105,6 +105,17 @@ class Property )); } + /** + * Delete entire list with given key. + * + * @param string $key Key of list + * @return int number of items removed + */ + public static function clearList($key) + { + return Database::exec("DELETE FROM property_list WHERE name = :key", compact('key')); + } + /* * Legacy getters/setters */ |