v1 server and lifecycle manager working. execution contract added
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import json
|
||||
|
||||
def buildSave(outputs, action):
|
||||
save_data = {}
|
||||
|
||||
for save_name in action.savedata:
|
||||
save_data[save_name] = outputs[save_name]
|
||||
|
||||
with open(f"{action.savepath}", "w") as save_file:
|
||||
json.dump(save_data, save_file)
|
||||
|
||||
print(f"{save_name} saved by {action.name}")
|
||||
|
||||
return save_file
|
||||
|
||||
def loadSave(outputs, action):
|
||||
with open(f"{action.savepath}", "r") as save_file:
|
||||
load_data = json.load(save_file)
|
||||
|
||||
for load_name in action.loaddata:
|
||||
outputs[load_name] = load_data[load_name]
|
||||
print(f"{load_name} loaded by {action.name}")
|
||||
|
||||
return outputs
|
||||
Reference in New Issue
Block a user