pub(crate) fn start_subgraph(&self) -> Result<(), StoreError> {
        use public::deployment_schemas as dsl;

        // Clear the `migrating` lock on the subgraph; this flag must be
        // visible to other db users before the migration starts and is
        // therefore set in its own txn before migration actually starts.
        // If the migration does not finish, e.g., because the server is shut
        // down, `migrating` remains set to `true` even though no work for
        // the migration is being done.
        Ok(
            diesel::update(
                dsl::table.filter(dsl::subgraph.eq(self.storage.subgraph().to_string())),
            )
            .set(dsl::migrating.eq(false))
            .execute(&self.conn)
            .map(|_| ())?,
        )
    }
/// Do any cleanup to bring the subgraph into a known good state
Do any cleanup to bring the subgraph into a known good state
Do any cleanup to bring the subgraph into a known good state
pub(crate) fn start_subgraph(&self) -> Result<(), StoreError> {
        use public::deployment_schemas as dsl;
        // Clear the `migrating` lock on the subgraph; this flag must be
        // visible to other db users before the migration starts and is
        // therefore set in its own txn before migration actually starts.
        // If the migration does not finish, e.g., because the server is shut
        // down, `migrating` remains set to `true` even though no work for
        // the migration is being done.
        Ok(
            diesel::update(
                dsl::table.filter(dsl::subgraph.eq(self.storage.subgraph().to_string())),
            )
            .set(dsl::migrating.eq(false))
            .execute(&self.conn)
            .map(|_| ())?,
        )
    }
pub ( crate ) fn start_subgraph ( & self ) -> Result < ( ) , StoreError > { use public :: deployment_schemas as dsl ; // Clear the `migrating` lock on the subgraph; this flag must be // visible to other db users before the migration starts and is // therefore set in its own txn before migration actually starts. // If the migration does not finish, e.g., because the server is shut // down, `migrating` remains set to `true` even though no work for // the migration is being done. Ok ( diesel :: update ( dsl :: table . filter ( dsl :: subgraph . eq ( self . storage . subgraph ( ) . to_string ( ) ) ) , ) . set ( dsl :: migrating . eq ( false ) ) . execute ( & self . conn ) . map ( | _ | ( ) ) ? , ) }
Do any cleanup to bring the subgraph into a known good state
Do any cleanup to bring the subgraph into a known good state
&self
&self