<commit_before>=====
Trunk
=====

Installing
==========

To install : ::

    pip install trunk


Usage
=====

Trunk tries to be as simple as possible ::

    t = Trunk("postgres://localhost/noclue")
    for notification in t.listen("clues"):
        print notification.channel, notification.payload
    t.notify("clues", "chandelier")
    t.unlisten("clues")


Celery
======

Trunk provides a `Kombu <http://kombu.readthedocs.org>`_ transport,
that allows you to use trunk with `Celery <http://celeryproject.org>`_,
to do configure Celery with ::

    BROKER_URL = 'trunk.transport.Transport://localhost/database'<commit_msg>add some words about current limitations<commit_after>=====
Trunk
=====

Installing
==========

To install : ::

    pip install trunk


Usage
=====

Trunk tries to be as simple as possible ::

    t = Trunk("postgres://localhost/noclue")
    for notification in t.listen("clues"):
        print notification.channel, notification.payload
    t.notify("clues", "chandelier")
    t.unlisten("clues")


Celery
======

Trunk provides a `Kombu <http://kombu.readthedocs.org>`_ transport,
that allows you to use trunk with `Celery <http://celeryproject.org>`_,
to do configure Celery with ::

    BROKER_URL = 'trunk.transport.Transport://localhost/database'

Limitations
-----------

For now, and since LISTEN/NOTIFY behavior is not strictly speaking a queue,
if you have more than one celery worker (but you can use worker concurrency),
each worker will receive every job send.
{'fraction_non_alphanumeric': 0.14533333333333334, 'fraction_numerical': 0.0, 'mean_word_length': 3.9375, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1810804', 'n_tokens_mistral': 479, 'n_tokens_neox': 449, 'n_words': 142}