#!/usr/bin/env php . */ define('INSTALLDIR', realpath(dirname(__FILE__) . '/../..')); $shortoptions = 'u'; $longoptions = array('universe'); $helptext = <<selectAdd(); $rc->selectAdd('channel_key'); $rc->whereAdd('modified < "' . common_sql_date(time() - Realtime_channel::TIMEOUT) . '"'); if ($rc->find()) { $keys = $rc->fetchAll(); foreach ($keys as $key) { $rc = Realtime_channel::getKV('channel_key', $key); if (!empty($rc)) { printfv("Deleting realtime channel '$key'\n"); $rc->delete(); } } } } if (have_option('u', 'universe')) { $sn = new Status_network(); if ($sn->find()) { while ($sn->fetch()) { $server = $sn->getServerName(); StatusNet::init($server); cleanupChannels(); } } } else { cleanupChannels(); }