pub struct RemoteOperationRecord {
pub id: i64,
pub remote_name: String,
pub branch_name: String,
pub operation: RemoteOperationKind,
pub from_commit: Option<DoltHashId>,
pub assets_transfer_checkpoint: Option<DoltHashId>,
pub to_commit: Option<DoltHashId>,
pub transfer_id: Option<Uuid>,
pub transfer_expires_at: Option<i64>,
pub started_at: String,
pub completed_at: Option<String>,
pub failed_at: Option<String>,
}Expand description
Tracks a remote operation until its graph and asset phases are complete.
Fields§
§id: i64Config database row identifier.
remote_name: StringConfigured remote participating in the operation.
branch_name: StringBranch transferred by the operation.
operation: RemoteOperationKindDirection of the remote graph transfer.
from_commit: Option<DoltHashId>Local branch commit from before the graph transfer.
assets_transfer_checkpoint: Option<DoltHashId>Last commit whose complete asset batch was verified locally.
to_commit: Option<DoltHashId>Destination graph commit whose assets must be transferred.
transfer_id: Option<Uuid>GenHub push lease retained by a pending operation.
transfer_expires_at: Option<i64>Unix timestamp after which GenHub will reject the retained push lease.
started_at: StringTime at which the operation began.
completed_at: Option<String>Time at which both graph and asset transfer completed.
failed_at: Option<String>Time at which the operation became unrecoverable.
Implementations§
Source§impl RemoteOperationRecord
impl RemoteOperationRecord
pub fn select(conn: &Connection) -> RemoteOperationRecordSelect<'_>
pub fn all(conn: &Connection) -> Result<Vec<Self>, ModelSelectError>
Source§impl RemoteOperationRecord
impl RemoteOperationRecord
Sourcepub fn begin_or_resume(
conn: &ConfigConnection,
remote_name: &str,
branch_name: &str,
operation: RemoteOperationKind,
from_commit: Option<&DoltHashId>,
) -> SQLResult<Self>
pub fn begin_or_resume( conn: &ConfigConnection, remote_name: &str, branch_name: &str, operation: RemoteOperationKind, from_commit: Option<&DoltHashId>, ) -> SQLResult<Self>
Resumes an incomplete operation or starts one from the supplied local commit.
Sourcepub fn set_destination(
&mut self,
conn: &ConfigConnection,
to_commit: &DoltHashId,
) -> SQLResult<()>
pub fn set_destination( &mut self, conn: &ConfigConnection, to_commit: &DoltHashId, ) -> SQLResult<()>
Records the desired end commit an operation is tracking.
Sourcepub fn advance_assets_transfer_checkpoint(
&mut self,
conn: &ConfigConnection,
commit: &DoltHashId,
) -> SQLResult<()>
pub fn advance_assets_transfer_checkpoint( &mut self, conn: &ConfigConnection, commit: &DoltHashId, ) -> SQLResult<()>
After transferring assets for a commit, mark it in the database so subsequent transfers for resumes can restart from there.
Sourcepub fn set_push_destination(
&mut self,
conn: &ConfigConnection,
to_commit: &DoltHashId,
transfer_id: Uuid,
transfer_expires_at: i64,
) -> SQLResult<()>
pub fn set_push_destination( &mut self, conn: &ConfigConnection, to_commit: &DoltHashId, transfer_id: Uuid, transfer_expires_at: i64, ) -> SQLResult<()>
Records the successful push graph transfer and its capability-scoped lease.
Sourcepub fn complete(&self, conn: &ConfigConnection) -> SQLResult<()>
pub fn complete(&self, conn: &ConfigConnection) -> SQLResult<()>
Marks the operation complete only after its graph and asset phases succeed.
pub fn fail(&self, conn: &ConfigConnection) -> SQLResult<()>
Trait Implementations§
Source§impl Clone for RemoteOperationRecord
impl Clone for RemoteOperationRecord
Source§impl Debug for RemoteOperationRecord
impl Debug for RemoteOperationRecord
impl Eq for RemoteOperationRecord
Source§impl PartialEq for RemoteOperationRecord
impl PartialEq for RemoteOperationRecord
impl StructuralPartialEq for RemoteOperationRecord
Auto Trait Implementations§
impl Freeze for RemoteOperationRecord
impl RefUnwindSafe for RemoteOperationRecord
impl Send for RemoteOperationRecord
impl Sync for RemoteOperationRecord
impl Unpin for RemoteOperationRecord
impl UnsafeUnpin for RemoteOperationRecord
impl UnwindSafe for RemoteOperationRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more