rasahub.messagehandler module

class rasahub.messagehandler.RasahubHandler[source]

Bases: object

RasahubHandler Handles messages, keeps main queue, gets tasks from queue and sends to plugin workers.

add_plugin(pluginname, plugintype, plugin)[source]

Method to add a plugin to RasahubHandler

Args:
pluginname: Name of the plugin plugintype: Type of the plugin (interface / interpreter / datastore) plugin: Instance of plugin
end_processes()[source]

Ending method ends processes of handler itself and plugins. Also joins main queue.

Returns:
True if all threads could be ended.
main_thread(main_queue, main_event)[source]

Main thread handles message transfers between plugins

Args:
main_queue: Main message queue main_event: Main thread event
start()[source]

Start method starts the handling thread and all plugin threads.

Returns:
True if all plugins were started properly.