<commit_before><?php

namespace Linio\Component\Queue\Adapter;

use PhpAmqpLib\Connection\AMQPConnection;
use PhpAmqpLib\Message\AMQPMessage;
use PhpAmqpLib\Channel\AMQPChannel;
use Linio\Component\Queue\AdapterInterface;
use Linio\Component\Queue\Job;

class RabbitAdapter implements AdapterInterface
{
    /**
     * @var AMQPChannel
     */
    protected $channel;

    /**
     * @var array
     */
    protected $config;

    /**
     * {@inheritdoc}
     */
    public function __construct(array $config = [])
    {
        $this->config = $config;
    }

    /**
     * {@inheritdoc}
     */
    public function add(Job $job)
    {
        $this->getChannel()->queue_declare($job->getQueue(), false, $job->isPersistent(), false, false);
        $message = new AMQPMessage($job->getPayload(), ['delivery_mode' => 2]);
        $this->getChannel()->basic_publish($message, '', $job->getQueue());
    }

    /**
     * {@inheritdoc}
     */
    public function perform(Job $job)
    {
        $this->getChannel()->queue_declare($job->getQueue(), false, $job->isPersistent(), false, false);
        $this->getChannel()->basic_qos(null, 1, null);<commit_msg>Changing Rabbit to be durable.<commit_after><?php

namespace Linio\Component\Queue\Adapter;

use PhpAmqpLib\Connection\AMQPConnection;
use PhpAmqpLib\Message\AMQPMessage;
use PhpAmqpLib\Channel\AMQPChannel;
use Linio\Component\Queue\AdapterInterface;
use Linio\Component\Queue\Job;

class RabbitAdapter implements AdapterInterface
{
    /**
     * @var AMQPChannel
     */
    protected $channel;

    /**
     * @var array
     */
    protected $config;

    /**
     * {@inheritdoc}
     */
    public function __construct(array $config = [])
    {
        $this->config = $config;
    }

    /**
     * {@inheritdoc}
     */
    public function add(Job $job)
    {
        $this->getChannel()->queue_declare($job->getQueue(), true, $job->isPersistent(), false, false);
        $message = new AMQPMessage($job->getPayload(), ['delivery_mode' => 2]);
        $this->getChannel()->basic_publish($message, '', $job->getQueue());
    }

    /**
     * {@inheritdoc}
     */
    public function perform(Job $job)
    {
        $this->getChannel()->queue_declare($job->getQueue(), true, $job->isPersistent(), false, false);
        $this->getChannel()->basic_qos(null, 1, null);
{'fraction_non_alphanumeric': 0.16502357479639948, 'fraction_numerical': 0.0017145306472353193, 'mean_word_length': 2.9425675675675675, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5918991', 'n_tokens_mistral': 749, 'n_tokens_neox': 721, 'n_words': 127}