@@ -63,6 +63,7 @@ def url(self) -> str:
6363def create_runtime (
6464 runtime_dir : str ,
6565 reflection_server_spec : ServerSpec ,
66+ id : str ,
6667 at_exit_fn : Callable [[Path ], None ] | None = None ,
6768) -> Path :
6869 """Create a runtime configuration for use with the genkit CLI.
@@ -87,7 +88,7 @@ def create_runtime(
8788 runtime_file_path = Path (os .path .join (runtime_dir , runtime_file_name ))
8889 metadata = json .dumps ({
8990 'reflectionApiSpecVersion' : 1 ,
90- 'id' : f' { os . getpid () } ' ,
91+ 'id' : id ,
9192 'pid' : os .getpid (),
9293 'genkitVersion' : 'py/' + DEFAULT_GENKIT_VERSION ,
9394 'reflectionServerUrl' : reflection_server_spec .url ,
@@ -104,11 +105,7 @@ def cleanup_runtime() -> None:
104105 return runtime_file_path
105106
106107
107- def init_default_runtime (spec : ServerSpec ) -> None :
108+ def init_default_runtime (spec : ServerSpec , id : str ) -> None :
108109 """Initialize the runtime for the Genkit instance."""
109110 runtimes_dir = os .path .join (os .getcwd (), '.genkit/runtimes' )
110- create_runtime (
111- runtime_dir = runtimes_dir ,
112- reflection_server_spec = spec ,
113- at_exit_fn = os .remove ,
114- )
111+ create_runtime (runtime_dir = runtimes_dir , reflection_server_spec = spec , id = id , at_exit_fn = os .remove )
0 commit comments