summaryrefslogtreecommitdiff
path: root/update_daemon2.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-24 14:54:59 +0400
committerAndrew Dolgov <[email protected]>2013-04-24 14:54:59 +0400
commite2cf81e21406f0b507446cf369f7da172ce9da14 (patch)
tree6c00059871b892a30c02d17336f7ed9cf268cb1c /update_daemon2.php
parent654650857ffc3e4914c9655528e1037939f75f54 (diff)
unify houskeeping stuff, increase spawn interval
Diffstat (limited to 'update_daemon2.php')
-rwxr-xr-xupdate_daemon2.php16
1 files changed, 3 insertions, 13 deletions
diff --git a/update_daemon2.php b/update_daemon2.php
index 7692eb930..d5b6a45e3 100755
--- a/update_daemon2.php
+++ b/update_daemon2.php
@@ -170,14 +170,15 @@
"Maybe another daemon is already running.\n");
}
- init_plugins();
-
$schema_version = get_schema_version();
if ($schema_version != SCHEMA_VERSION) {
die("Schema version is wrong, please upgrade the database.\n");
}
+ // Protip: children close shared database handle when terminating, it's a bad idea to
+ // do database stuff on main process from now on.
+
while (true) {
// Since sleep is interupted by SIGCHLD, we need another way to
@@ -190,17 +191,6 @@
}
if ($last_checkpoint + $spawn_interval < time()) {
-
- /* Check if schema version changed */
-
- $test_schema_version = get_schema_version();
-
- if ($test_schema_version != $schema_version) {
- echo "Expected schema version: $schema_version, got: $test_schema_version\n";
- echo "Schema version changed while we were running, bailing out\n";
- exit(100);
- }
-
check_ctimes();
reap_children();