dragon.workflows.runtime.publish

publish(name, publish_dir=None)[source]

Publish the current runtime descriptor to make it discoverable by other systems.

This function creates and publishes a serialized runtime descriptor that contains all necessary information for remote systems to connect to the current Dragon runtime. The descriptor is written to a file in the specified directory and an out-of-band network listener is started to accept incoming connections.

The published descriptor can later be retrieved by other systems using the lookup() function to establish remote execution capabilities.

Parameters:
  • name (str ) – Identifier name for the published runtime. This will be used as the filename

  • publish_dir (str , optional) – Directory where the descriptor file will be written. If None, uses ~/.dragon, defaults to None

Returns:

Serialized runtime descriptor string

Return type:

str

Raises:

RuntimeError – If the runtime has already been published with the given name