Skip to content
Snippets Groups Projects
Commit b6a4a574 authored by ='s avatar =
Browse files

lock lastChecked table

parent ba0d6505
Branches dev
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ foreach ($routes as $route => $stops) { ...@@ -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 `messages` WHERE `agency` = '{$agency}'");
dbq($db, "DELETE FROM `predictions` WHERE `agency` = '{$agency}'"); dbq($db, "DELETE FROM `predictions` WHERE `agency` = '{$agency}'");
......
...@@ -32,7 +32,7 @@ if ($lastFetched + $getRouteConfig_waitSeconds < time()) { ...@@ -32,7 +32,7 @@ if ($lastFetched + $getRouteConfig_waitSeconds < time()) {
if (@$source = file_get_contents($url)) { if (@$source = file_get_contents($url)) {
if ($thisXML = simplexml_load_string($source)) { 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 `routes` WHERE `agency` = '{$agency}'");
dbq($db, "DELETE FROM `stops` WHERE `agency` = '{$agency}'"); dbq($db, "DELETE FROM `stops` WHERE `agency` = '{$agency}'");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment