mirror#
Keep a warm standby session up to date with the active session.
Every change that succeeds on the active session is queued for each standby and applied there, in order, on a background thread, so the user’s script never waits for the standbys. A standby whose change fails is out of sync: the following changes are skipped until a resynchronizing job (restoring a checkpoint) brings it back to the state of the active session.
Classes:
|
Ordered queue of changes applied to one standby session. |
- class ansys.fluent.core.resilient.engine.mirror.StandbyMirror(standby, *, synced, on_error)#
Bases:
objectOrdered queue of changes applied to one standby session.
- Parameters:
- standby
object The standby session.
- syncedbool
Whether the standby already has the state of the active session.
- on_error
callable() Called as
on_error(mirror, description, error)when a change fails on the standby.
- standby
Methods:
__init__(standby, *, synced, on_error)close()Stop the worker; jobs not yet started are dropped.
invalidate(reason)Mark the standby out of sync once the changes queued so far have run.
submit(description, job, *[, resync])Queue
job.wait([timeout])Wait until every queued job has run; return whether it did in time.
Attributes:
Whether the mirror was closed.
Whether the standby has the state of the active session.
Whether a change was applied, or attempted, on the standby.
- __init__(standby, *, synced, on_error)#
- close()#
Stop the worker; jobs not yet started are dropped.
- invalidate(reason)#
Mark the standby out of sync once the changes queued so far have run.
- submit(description, job, *, resync=False)#
Queue
job.A
resyncjob runs even when the standby is out of sync, and brings it back in sync when it succeeds. Other jobs are skipped while it is out of sync.
- wait(timeout=None)#
Wait until every queued job has run; return whether it did in time.