mistk.transform.service module¶
-
class
mistk.transform.service.
TransformPluginEndpoint
¶ Bases:
object
-
add_task
(task)¶ Adds a task to this TransformPluginService and starts it using a pool of worker threads
- Parameters
task – The Task to register and start
- Returns
The running task
-
delete_task
(task)¶ Deletes the specified Task. This function is currently not supported
- Parameters
task – The task to delete
-
get_api_version
()¶ Returns the version of the MISTK API
- Returns
The MISTK API version as text
-
get_status
(watch=None, resourceVersion=None)¶ Retrieves the status of the transform plugin
- Return type
-
start_server
(port=8080)¶ Starts the http server of the Service
- Parameters
port – The port on which to start the server, defaults to 8080
-
property
state_machine
¶ Retrieves the state machine associated with this TransformPluginEndpoint
- Returns
the state machine
-
terminate
()¶ Shutdowns the transform plugin and cleans up any resources.
- Return type
None
-
transform
(initParams)¶ Performs the transforms defined for this plugin
- Parameters
initParams (dict | bytes) – A list of directory paths where input files can be found.
- Return type
None
-
property
transform_plugin
¶ Retrieves the model associated with this TransformPluginEndpoint
- Returns
the model
-
update_state
(state=None, payload=None)¶ Updates the state of the TransformPluginService
- Parameters
state – The new state. If not given, the current state will be used.
payload – Additional data to attach to the state
-
-
class
mistk.transform.service.
TransformPluginTask
(operation, parameters=None, submitted=None, completed=None, status=None, message=None)¶ Bases:
object
A task to be submitted to the Transform Plugin instance that will be performed and report status of.
-
mistk.transform.service.
initializeEndpointController
(handler, *modules)¶ This method iterates over the functions defined in the auto-generated flask modules And creates a function in this package which points bound member methods of the handler
- Parameters
handler – The handler object which must implement bound member methods which otherwise have the same signature as those defined in the controller_modules
modules – These are the autogenerated swagger controller modules