src.core.processing_pipe.src package

Submodules

src.core.processing_pipe.src.Job module

class src.core.processing_pipe.src.Job.Job(outbox_path, plugins_path, lock, i)[source]

Bases: threading.Thread

This class is the thread to launch Processors plugin. This class retrieves the processable products from database (products with state donwloaded) and it runs the plugins.

fibonacci(max_value)[source]

Fibonacci sequence algorithm implementation.

Parameters:max_value (int) – The max value to reach using the fibonacci algorithm
Returns:the n fibonacci number
Return type:int
run()[source]

Thread run method implementation.

src.core.processing_pipe.src.JobDispatcher module

class src.core.processing_pipe.src.JobDispatcher.JobDispatcher(outbox_path, plugins_path, delegate)[source]

Bases: threading.Thread

This class dispatches processing jobs.

run()[source]

Thread run method implementation. It launches the Job objects to process products via Processor plugins.

src.core.processing_pipe.src.Plugin module

class src.core.processing_pipe.src.Plugin.Plugin(plugin_name, plugin_path)[source]

Bases: object

It is a wrapper of C++ plugin. This class generates the folder of new product and runs the dynamic shared libraries (c++ plugins).

more_data()[source]

Utility method to manage out stream of dynamic shared libraries.

read_pipe()[source]

Utility method to manage out stream of dynamic shared libraries. Reading the out stream pipe.

run(source, outbox_path)[source]

This method runs the process method of dynamic shared library containing the plugin.

Parameters:
  • source (String) – The path in file system where is located the downloaded file.
  • outbox_path – The path of the processed products folder
Returns:

None

Return type:

None

src.core.processing_pipe.src.PluginManager module

class src.core.processing_pipe.src.PluginManager.PluginManager(plugins_path)[source]

Bases: object

This is the manager of plugins, it compiles C++ plugins and retrieve the list of available plugins, in ichnosat platform

compile_plugins()[source]

This method compiles every c++ plugin present in the plugins folder of Processor module

get_plugins()[source]

This method retrieve the list of plugins available to process product, via file system inspection.

Returns:list of available plugins in ichnosat platform
Return type:List

src.core.processing_pipe.src.ProcessingPipeManager module

class src.core.processing_pipe.src.ProcessingPipeManager.ProcessingPipeManager[source]

Bases: object

It is the entry point of the Processor, handling the processing requests triggered by the Downloader

notify_to_scientific_processor(file_path)[source]

This method launches the http request to trigger a new processing process. It represent the networking interface to the scientific processor.

Parameters:file_path (String) – The path where is located the product to process
process_product(product_name)[source]

This method is the wrapper of the web request to trigger a new processing task.

Parameters:product_name (String) – The name of the product to process
start_processing()[source]

The entry point of the ProcessingPipeManager class.

Module contents