[TwitterBridge][DAEMONS] Fix database connection clean-up
This commit is contained in:
parent
681aa5b326
commit
8290b137fa
|
@ -105,7 +105,11 @@ class SyncTwitterFriendsDaemon extends ParallelizingDaemon
|
||||||
$conn->disconnect();
|
$conn->disconnect();
|
||||||
|
|
||||||
global $_DB_DATAOBJECT;
|
global $_DB_DATAOBJECT;
|
||||||
unset($_DB_DATAOBJECT['CONNECTIONS']);
|
foreach ($_DB_DATAOBJECT['CONNECTIONS'] as $k => $v) {
|
||||||
|
if ($v === $conn) {
|
||||||
|
unset($_DB_DATAOBJECT['CONNECTIONS'][$k]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $flinks;
|
return $flinks;
|
||||||
}
|
}
|
||||||
|
@ -129,7 +133,11 @@ class SyncTwitterFriendsDaemon extends ParallelizingDaemon
|
||||||
// XXX: Couldn't find a less brutal way to blow
|
// XXX: Couldn't find a less brutal way to blow
|
||||||
// away a cached connection
|
// away a cached connection
|
||||||
global $_DB_DATAOBJECT;
|
global $_DB_DATAOBJECT;
|
||||||
unset($_DB_DATAOBJECT['CONNECTIONS']);
|
foreach ($_DB_DATAOBJECT['CONNECTIONS'] as $k => $v) {
|
||||||
|
if ($v === $conn) {
|
||||||
|
unset($_DB_DATAOBJECT['CONNECTIONS'][$k]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fetchTwitterFriends(Foreign_link $flink)
|
public function fetchTwitterFriends(Foreign_link $flink)
|
||||||
|
|
|
@ -128,7 +128,11 @@ class TwitterStatusFetcher extends ParallelizingDaemon
|
||||||
unset($flink);
|
unset($flink);
|
||||||
|
|
||||||
$conn->disconnect();
|
$conn->disconnect();
|
||||||
unset($_DB_DATAOBJECT['CONNECTIONS']);
|
foreach ($_DB_DATAOBJECT['CONNECTIONS'] as $k => $v) {
|
||||||
|
if ($v === $conn) {
|
||||||
|
unset($_DB_DATAOBJECT['CONNECTIONS'][$k]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $flinks;
|
return $flinks;
|
||||||
}
|
}
|
||||||
|
@ -153,7 +157,11 @@ class TwitterStatusFetcher extends ParallelizingDaemon
|
||||||
// XXX: Couldn't find a less brutal way to blow
|
// XXX: Couldn't find a less brutal way to blow
|
||||||
// away a cached connection
|
// away a cached connection
|
||||||
global $_DB_DATAOBJECT;
|
global $_DB_DATAOBJECT;
|
||||||
unset($_DB_DATAOBJECT['CONNECTIONS']);
|
foreach ($_DB_DATAOBJECT['CONNECTIONS'] as $k => $v) {
|
||||||
|
if ($v === $conn) {
|
||||||
|
unset($_DB_DATAOBJECT['CONNECTIONS'][$k]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTimeline(Foreign_link $flink, $timelineUri = 'home_timeline')
|
public function getTimeline(Foreign_link $flink, $timelineUri = 'home_timeline')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user