<commit_before><?php

class EventPublisher {
    function publish($msg, $key) {
        try {
            // Create a connection
            $cnn = new AMQPConnection();
            $cnn->setHost(config()->event_host);
            $cnn->setLogin(config()->event_user);
            $cnn->setPassword(config()->event_pass);
            $cnn->setVhost(config()->event_vhost);

            //connect and get channel
            $cnn->connect();
            $ch = new AMQPChannel($cnn);

            // Declare a new exchange
            $ex = new AMQPExchange($ch);
            $ex->setName(config()->event_exchange);
            $ex->setType(AMQP_EX_TYPE_TOPIC);
            $ex->declare();
            $ex->publish($msg, $key);

            $cnn->disconnect();
        } catch(Exception $e) {
            elog("Failed to publish event");
            elog($e);
        }
    } 
}<commit_msg>Replaced deprecated AMQP function with new one Fixed incorrect "fp114_rtgocdev" tx link<commit_after><?php

class EventPublisher {
    function publish($msg, $key) {
        try {
            // Create a connection
            $cnn = new AMQPConnection();
            $cnn->setHost(config()->event_host);
            $cnn->setLogin(config()->event_user);
            $cnn->setPassword(config()->event_pass);
            $cnn->setVhost(config()->event_vhost);

            //connect and get channel
            $cnn->connect();
            $ch = new AMQPChannel($cnn);

            $ex = new AMQPExchange($ch);
            $ex->setName(config()->event_exchange);
            $ex->setType(AMQP_EX_TYPE_TOPIC);
            $ex->declareExchange();
            $ex->publish($msg, $key);

            $cnn->disconnect();
        } catch(Exception $e) {
            elog("Failed to publish event");
            elog($e);
        }
    } 
}
{'fraction_non_alphanumeric': 0.14945054945054945, 'fraction_numerical': 0.0016483516483516484, 'mean_word_length': 1.7801526717557252, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, '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': '4984756', 'n_tokens_mistral': 552, 'n_tokens_neox': 521, 'n_words': 97}