streams/Code/Update/_1263.php
Mike Macgirvin f15c949147 minor tweak
2022-11-06 15:04:22 -08:00

35 lines
765 B
PHP

<?php
namespace Code\Update;
use Code\Lib\ObjCache;
class _1263
{
public function run()
{
while (1) {
$results = q("select iconfig.*, item.mid from iconfig left join item on iid = item.id
where cat = 'activitypub' and k = 'rawmsg' limit 300");
if (!$results) {
break;
}
foreach ($results as $result) {
if ($result['mid']) {
ObjCache::Set($result['mid'],$result['v']);
}
q("delete from iconfig where id = %d",
intval($result['id'])
);
}
}
return UPDATE_SUCCESS;
}
public function verify()
{
return true;
}
}