<commit_before>Writing Task Plugins
====================

Tasks are configurable operations that execute on machines. They are
provided a remote connection and a user-supplied config. With these
they can chain together any number of other internal tasks and remote
processes.

Defining tasks
~~~~~~~~~~~~~~

The ``deftask`` macro is a convenient way to implement the required
protocols and multimethods required to hook into the matross plugin system.

.. code-block:: clojure

   (deftask :my-task [conn config]
     ;; (run conn commands...)
     (task-result task-successful? changed? result-map))

This will register the task ``:my-task`` for use with matross. Your
task may take any configuration and return any result-map.

Using your task
~~~~~~~~~~~~~~~

.. code-block: clojure

   {:type :my-task
    :my-arg "hello, world"}

This map will be provided instances of ``:my-task`` as ``config``.

==================<commit_msg>fixing rst type :weary:<commit_after>Writing Task Plugins
====================

Tasks are configurable operations that execute on machines. They are
provided a remote connection and a user-supplied config. With these
they can chain together any number of other internal tasks and remote
processes.

Defining tasks
~~~~~~~~~~~~~~

The ``deftask`` macro is a convenient way to implement the required
protocols and multimethods required to hook into the matross plugin system.

.. code-block:: clojure

   (deftask :my-task [conn config]
     ;; (run conn commands...)
     (task-result task-successful? changed? result-map))

This will register the task ``:my-task`` for use with matross. Your
task may take any configuration and return any result-map.

Using your task
~~~~~~~~~~~~~~~

.. code-block:: clojure

   {:type :my-task
    :my-arg "hello, world"}

This map will be provided instances of ``:my-task`` as ``config``.

==================
{'fraction_non_alphanumeric': 0.14864144912093766, 'fraction_numerical': 0.0, 'mean_word_length': 4.275280898876405, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3736677', 'n_tokens_mistral': 519, 'n_tokens_neox': 502, 'n_words': 229}