plumpy.process_listener module

class plumpy.process_listener.ProcessListener[source]

Bases: plumpy.persistence.Savable

_abc_impl = <_abc_data object>
_auto_persist: Optional[Set[str]] = {'_params'}
init(**kwargs: Any)None[source]
load_instance_state(saved_state: MutableMapping[str, Any], load_context: Optional[plumpy.persistence.LoadSaveContext])None[source]
on_output_emitted(process: Process, output_port: str, value: Any, dynamic: bool)None[source]

Called when the process has emitted an output value

Parameters
  • process – The process

  • output_port – The output port that the value was outputted on

  • value – The value that was outputted

  • dynamic – True if the port is dynamic, False otherwise

on_process_created(process: Process)None[source]

Called when the process has been started

Parameters

process – The process

on_process_excepted(process: Process, reason: str)None[source]

Called when the process has excepted

Parameters
  • process – The process

  • reason – A string of the exception message

on_process_finished(process: Process, outputs: Any)None[source]

Called when the process has finished successfully

Parameters
  • process – The process

  • outputs – The process outputs

on_process_killed(process: Process, msg: str)None[source]

Called when the process was killed

Parameters

process – The process

on_process_paused(process: Process)None[source]

Called when the process is about to re-enter the RUNNING state

Parameters

process – The process

on_process_played(process: Process)None[source]

Called when the process is about to re-enter the RUNNING state

Parameters

process – The process

on_process_running(process: Process)None[source]

Called when the process is about to enter the RUNNING state

Parameters

process – The process

on_process_waiting(process: Process)None[source]

Called when the process is about to enter the WAITING state

Parameters

process – The process