Skip to main content
Version: 14

viktor.external.external_program

ExternalProgram

class viktor.external.external_program.ExternalProgram(queue_name, version)

Bases: ABC

Warning

Do not use this class directly in an application!

Base-class of an external analysis.

Parameters:
  • queue_name (str) – Name of the external integration.

  • version (int) – Version of the API between SDK <-> worker.

execute(timeout=25)

Run method to start an external analysis using a VIKTOR worker.

Note

This method needs to be mocked in (automated) unit and integration tests.

Parameters:

timeout (int) – Timeout period in seconds.

Raises:
  • TimeoutError when timeout has been exceeded

  • ConnectionError if no worker installed or connected

  • LicenseError if no license is available

  • ExecutionError if the external program cannot execute with the provided inputs

Return type:

None