Ip\Internal\Email\Db::deleteOld PHP Метод

deleteOld() публичный статический Метод

*apparently there were some errors if exists old locked records.
public static deleteOld ( $hours )
    public static function deleteOld($hours)
    {
        $table = ipTable('email_queue');
        $sql = "delete from {$table} where\n        (`lock` is not NULL and " . ipDb()->sqlMinAge('lockedAt', $hours, 'HOUR') . ")\n        or (`send` is not NULL and " . ipDb()->sqlMinAge('send', $hours, 'HOUR') . ")";
        return ipDb()->execute($sql);
    }