types#

Shared vocabulary of the resilient engine (standard library only).

Classes:

Checkpoint(name, path, include_data[, ...])

A restorable checkpoint written by the product (for example a case file).

Classification(category, severity, message)

Result of classifying an exception.

ErrorCategory(value[, names, module, ...])

Machine-readable classification of an error raised by a settings call.

EventKind(value[, names, module, qualname, ...])

Kinds of events reported by a resilient session.

ResilientEvent(kind, message[, path, data])

An event reported to listeners registered with on_event.

Severity(value[, names, module, qualname, ...])

How the engine responds to a classified error.

StepOutcome(path, ok[, old_value, ...])

Outcome of one intercepted settings write or command.

Functions:

brief(value)

Return a compact, printable preview of a settings value.

class ansys.fluent.core.resilient.engine.types.Checkpoint(name, path, include_data, reason=None, journal_seq=0, created_at=<factory>)#

Bases: object

A restorable checkpoint written by the product (for example a case file).

Attributes:

created_at

include_data

journal_seq

Journal position when the checkpoint was taken.

name

path

reason

Methods:

to_dict()

Return the checkpoint metadata as a plain dictionary.

created_at: float#
include_data: bool#
journal_seq: int = 0#

Journal position when the checkpoint was taken. Journal operations with a sequence number at or above this value happened after the checkpoint.

name: str#
path: str#
reason: str | None = None#
to_dict()#

Return the checkpoint metadata as a plain dictionary.

class ansys.fluent.core.resilient.engine.types.Classification(category, severity, message, details=None)#

Bases: object

Result of classifying an exception.

Attributes:

benign

Whether this is a clean solver stop rather than an error.

catastrophic

Whether this error makes the session unusable.

category

details

message

severity

property benign: bool#

Whether this is a clean solver stop rather than an error.

property catastrophic: bool#

Whether this error makes the session unusable.

category: ErrorCategory#
details: str | None = None#
message: str#
severity: Severity#
class ansys.fluent.core.resilient.engine.types.ErrorCategory(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)#

Bases: Enum

Machine-readable classification of an error raised by a settings call.

Attributes:

BENIGN_INTERRUPT

A clean stop of an interruptible (solve) command.

FATAL

The server is in a fatal state or no longer serving.

READ_ONLY

The target is read-only.

UNKNOWN

None of the above.

BENIGN_INTERRUPT = 'benign_interrupt'#

A clean stop of an interruptible (solve) command.

FATAL = 'fatal'#

The server is in a fatal state or no longer serving.

READ_ONLY = 'read_only'#

The target is read-only.

UNKNOWN = 'unknown'#

None of the above.

class ansys.fluent.core.resilient.engine.types.EventKind(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)#

Bases: str, Enum

Kinds of events reported by a resilient session.

Attributes:

CHECKPOINT

A checkpoint was written.

FAILOVER

A standby session took over from a session that died.

REDO

A journaled settings write was redone.

ROLLBACK

The session was restored to a checkpoint.

UNDO

A journaled settings write was undone.

Methods:

__new__(value)

CHECKPOINT = 'checkpoint'#

A checkpoint was written.

FAILOVER = 'failover'#

A standby session took over from a session that died.

REDO = 'redo'#

A journaled settings write was redone.

ROLLBACK = 'rollback'#

The session was restored to a checkpoint.

UNDO = 'undo'#

A journaled settings write was undone.

__new__(value)#
class ansys.fluent.core.resilient.engine.types.ResilientEvent(kind, message, path=None, data=<factory>)#

Bases: object

An event reported to listeners registered with on_event.

Attributes:

data: dict[str, Any]#
kind: EventKind#
message: str#
path: str | None = None#
class ansys.fluent.core.resilient.engine.types.Severity(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)#

Bases: Enum

How the engine responds to a classified error.

Attributes:

BENIGN

Not an error (clean solver stop).

CATASTROPHIC

The session is unusable; fail over to a standby session if one exists.

HARD

Not catastrophic; the original error is raised unchanged.

BENIGN = 'benign'#

Not an error (clean solver stop).

CATASTROPHIC = 'catastrophic'#

The session is unusable; fail over to a standby session if one exists.

HARD = 'hard'#

Not catastrophic; the original error is raised unchanged.

class ansys.fluent.core.resilient.engine.types.StepOutcome(path, ok, old_value=None, new_value=None, result=None, rolled_back=False, failed_over=False, error=None)#

Bases: object

Outcome of one intercepted settings write or command.

Attributes:

Methods:

to_dict()

Return the non-empty fields of the outcome as a plain dictionary.

error: str | None = None#
failed_over: bool = False#
new_value: Any = None#
ok: bool#
old_value: Any = None#
path: str#
result: Any = None#
rolled_back: bool = False#
to_dict()#

Return the non-empty fields of the outcome as a plain dictionary.

ansys.fluent.core.resilient.engine.types.brief(value)#

Return a compact, printable preview of a settings value.