public function removeDeleted()
    {
        $trx = models\DbMessage::getDb()->transaction !== null ? null : models\DbMessage::getDb()->beginTransaction();
        $primaryKey = models\DbMessage::primaryKey();
        $message_ids = models\DbMessage::find()
            ->withQueue($this->id)
            ->deleted()
            ->select($primaryKey)
            ->asArray()
            ->all();
        models\DbMessage::deleteAll(['in', $primaryKey, $message_ids]);
        if ($trx !== null) {
            $trx->commit();
        }

        return $message_ids;
    }
public function removeDeleted()
    {
        $trx = models\DbMessage::getDb()->transaction !== null ? null : models\DbMessage::getDb()->beginTransaction();
        $primaryKey = models\DbMessage::primaryKey();
        $message_ids = models\DbMessage::find()
            ->withQueue($this->id)
            ->deleted()
            ->select($primaryKey)
            ->asArray()
            ->all();
        models\DbMessage::deleteAll(['in', $primaryKey, $message_ids]);
        if ($trx !== null) {
            $trx->commit();
        }

        return $message_ids;
    }
public function removeDeleted ( ) { $ trx = models \ DbMessage :: getDb ( ) -> transaction !== null ? null : models \ DbMessage :: getDb ( ) -> beginTransaction ( ) ; $ primaryKey = models \ DbMessage :: primaryKey ( ) ; $ message_ids = models \ DbMessage :: find ( ) -> withQueue ( $ this -> id ) -> deleted ( ) -> select ( $ primaryKey ) -> asArray ( ) -> all ( ) ; models \ DbMessage :: deleteAll ( [ 'in' , $ primaryKey , $ message_ids ] ) ; if ( $ trx !== null ) { $ trx -> commit ( ) ; } return $ message_ids ; }
Removes deleted messages from the storage.
@return array of removed message ids
Removes deleted messages from the storage .