$queueAllis->add($alli['id']);
    }
}
while ($timer->stop() <= 55000) {
    sleep(1);
    $id = (int) $queueAllis->next(false);
    if ($id == null) {
        exit;
    }
    $alliance = $mdb->findDoc('information', ['type' => 'allianceID', 'id' => $id]);
    $id = $alliance['id'];
    $name = $alliance['name'];
    $currentInfo = $mdb->findDoc('information', ['type' => 'alliance', 'id' => $id]);
    $alliCrest = CrestTools::getJSON("https://public-crest.eveonline.com/alliances/{$id}/");
    if ($alliCrest == null || !isset($alliCrest['name'])) {
        $mdb->set('information', ['type' => 'alliance', 'id' => $id], ['lastApiUpdate' => $mdb->now()]);
        continue;
    }
    $update = [];
    $update['lastApiUpdate'] = $mdb->now();
    $update['corpCount'] = (int) $alliCrest['corporationsCount'];
    $update['executorCorpID'] = (int) @$alliCrest['executorCorporation']['id'];
    addCorp($update['executorCorpID']);
    $memberCount = 0;
    $update['deleted'] = $alliCrest['deleted'];
    $mdb->set('information', ['type' => 'corporationID', 'allianceID' => $id], ['allianceID' => 0]);
    if ($alliCrest['corporations']) {
        foreach ($alliCrest['corporations'] as $corp) {
            $corpID = (int) $corp['id'];
            addCorp($corpID);
            $infoCorp = $mdb->findDoc('information', ['type' => 'corporationID', 'id' => $corpID]);