From b6a4a574a239bee30c8f3a774dc2d550121e3865 Mon Sep 17 00:00:00 2001 From: = <=> Date: Wed, 12 Mar 2014 15:15:24 +0000 Subject: [PATCH] lock lastChecked table --- cron/getPredictions.php | 2 +- cron/getRouteConfig.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cron/getPredictions.php b/cron/getPredictions.php index 80984ee..09fd2e4 100644 --- a/cron/getPredictions.php +++ b/cron/getPredictions.php @@ -48,7 +48,7 @@ foreach ($routes as $route => $stops) { } } -dbq($db, "LOCK TABLES `predictions` WRITE, `messages` WRITE"); +dbq($db, "LOCK TABLES `predictions` WRITE, `messages` WRITE, `lastChecked` WRITE"); dbq($db, "DELETE FROM `messages` WHERE `agency` = '{$agency}'"); dbq($db, "DELETE FROM `predictions` WHERE `agency` = '{$agency}'"); diff --git a/cron/getRouteConfig.php b/cron/getRouteConfig.php index bbe63b9..ab4426e 100644 --- a/cron/getRouteConfig.php +++ b/cron/getRouteConfig.php @@ -32,7 +32,7 @@ if ($lastFetched + $getRouteConfig_waitSeconds < time()) { if (@$source = file_get_contents($url)) { if ($thisXML = simplexml_load_string($source)) { - dbq($db, "LOCK TABLES `routes` WRITE, `stops` WRITE, `route_stops` WRITE"); + dbq($db, "LOCK TABLES `routes` WRITE, `stops` WRITE, `route_stops` WRITE, `lastChecked` WRITE"); dbq($db, "DELETE FROM `routes` WHERE `agency` = '{$agency}'"); dbq($db, "DELETE FROM `stops` WHERE `agency` = '{$agency}'"); -- GitLab