hpcflow.sdk.persistence.pending.PendingChanges#
- class hpcflow.sdk.persistence.pending.PendingChanges(app, store, resource_map)#
Bases:
object
Class to store pending changes and merge them into a persistent store.
- Parameters:
add_tasks – Keys are new task IDs
add_elem_iter_EAR_IDs – Keys are element iteration IDs, then EAR action index, and values are EAR IDs. This is a list of EAR IDs to add to a given element iteration action.
add_elem_iter_IDs – Keys are element IDs, and values are iteration IDs to add to that element.
add_elem_IDs – Keys are task IDs, and values are element IDs to add to that task.
add_parameters – Keys are parameter indices and values are tuples whose first element is data to add and whose second element is the source dict for the new data.
update_param_sources – Keys are parameter indices and values are dict parameter sources to merge with existing source of that parameter.
set_EAR_starts – Keys are EAR IDs and values are tuples of start time, and start dir snapshot.
set_EAR_ends – Keys are EAR IDs and values are tuples of end time, end dir snapshot, exit code, and success boolean.
Methods
Commit all pending changes to disk.
Add pending files to the files directory.
Make pending update to element iteration loop indices persistent.
Make pending update to the number of loop iterations.
Commit pending loops to disk.
Make pending changes to parameter sources persistent.
Make pending parameters persistent.
Commit pending submissions to disk.
Commit pending tasks to disk.
Clear all pending data and prepare to accept new pending data.
Attributes
- clear_add_EARs()#
- clear_add_elem_IDs()#
- clear_add_elem_iter_EAR_IDs()#
- clear_add_elem_iter_IDs()#
- clear_add_elem_iters()#
- clear_add_element_sets()#
- clear_add_elements()#
- clear_add_files()#
- clear_add_loops()#
- clear_add_parameters()#
- clear_add_submission_parts()#
- clear_add_submissions()#
- clear_add_tasks()#
- clear_add_template_components()#
- clear_set_EAR_ends()#
- clear_set_EAR_skips()#
- clear_set_EAR_starts()#
- clear_set_EAR_submission_indices()#
- clear_set_EARs_initialised()#
- clear_set_js_metadata()#
- clear_set_parameters()#
- clear_update_loop_indices()#
- clear_update_loop_num_iters()#
- clear_update_param_sources()#
- commit_EAR_ends()#
- Return type:
None
- commit_EAR_skips()#
- Return type:
None
- commit_EAR_starts()#
- Return type:
None
- commit_EAR_submission_indices()#
- Return type:
None
- commit_EARs()#
- Return type:
None
- commit_EARs_initialised()#
- Return type:
None
- commit_all()#
Commit all pending changes to disk.
- commit_elem_IDs()#
- Return type:
None
- commit_elem_iter_EAR_IDs()#
- Return type:
None
- commit_elem_iter_IDs()#
- Return type:
None
- commit_elem_iters()#
- Return type:
None
- commit_element_sets()#
- Return type:
None
- commit_elements()#
- Return type:
None
- commit_files()#
Add pending files to the files directory.
- Return type:
None
- commit_js_metadata()#
- Return type:
None
- commit_loop_indices()#
Make pending update to element iteration loop indices persistent.
- Return type:
None
- commit_loop_num_iters()#
Make pending update to the number of loop iterations.
- Return type:
None
- commit_loops()#
Commit pending loops to disk.
- Return type:
None
- commit_param_sources()#
Make pending changes to parameter sources persistent.
- Return type:
None
- commit_parameters()#
Make pending parameters persistent.
- Return type:
None
- commit_submission_parts()#
- Return type:
None
- commit_submissions()#
Commit pending submissions to disk.
- Return type:
None
- commit_tasks()#
Commit pending tasks to disk.
- Return type:
None
- commit_template_components()#
- Return type:
None
- property logger#
- reset(is_init=False)#
Clear all pending data and prepare to accept new pending data.
- Return type:
None