checkpoint#
Checkpoint files: naming, retention and pre-flight checks.
The adapter writes and reads the product’s checkpoint files (for example a case
and data file). This module decides where they go, keeps the newest
keep_last of them, and – when the server shares the client’s file system –
validates paths before and after each write so that a bad target fails fast
instead of leaving a synchronous server command waiting.
Classes:
|
Write, restore and prune the checkpoints of one resilient session. |
Functions:
|
Check that the checkpoint file at |
|
Check that a checkpoint can be written to |
|
Make a checkpoint name safe to use in a file name. |
- class ansys.fluent.core.resilient.engine.checkpoint.CheckpointStore(adapter, config, *, run_id)#
Bases:
objectWrite, restore and prune the checkpoints of one resilient session.
Methods:
__init__(adapter, config, *, run_id)discard_after(checkpoint)Forget every checkpoint newer than
checkpoint.find([name])Return the newest checkpoint, or the newest one called
name.newest()Return the newest retained checkpoint, if any.
restore(session, checkpoint)Restore
sessionfromcheckpoint.write(session, name, *[, reason, journal_seq])Write a checkpoint of
session.Attributes:
Return the retained checkpoints (oldest first).
- __init__(adapter, config, *, run_id)#
- property checkpoints: list[Checkpoint]#
Return the retained checkpoints (oldest first).
- discard_after(checkpoint)#
Forget every checkpoint newer than
checkpoint.
- find(name=None)#
Return the newest checkpoint, or the newest one called
name.- Raises:
CheckpointErrorIf no matching checkpoint is retained.
- newest()#
Return the newest retained checkpoint, if any.
- restore(session, checkpoint)#
Restore
sessionfromcheckpoint.- Raises:
CheckpointErrorIf the checkpoint files are missing or the product fails to read them.
- write(session, name, *, reason=None, journal_seq=0)#
Write a checkpoint of
session.- Raises:
CheckpointErrorIf the checkpoint cannot be written or verified.
- ansys.fluent.core.resilient.engine.checkpoint.preflight_read(file_path)#
Check that the checkpoint file at
file_pathcan be read.- Raises:
CheckpointErrorIf the file is missing, unreadable, or empty.
- ansys.fluent.core.resilient.engine.checkpoint.preflight_write(file_path)#
Check that a checkpoint can be written to
file_path.- Raises:
CheckpointErrorIf the file name is invalid, the directory is missing or not writable, or the path is too long.
- ansys.fluent.core.resilient.engine.checkpoint.sanitize(name)#
Make a checkpoint name safe to use in a file name.