Skip to content

Commit

Permalink
feat: remove upgrade post-process
Browse files Browse the repository at this point in the history
Signed-off-by: David Dal Busco <[email protected]>
  • Loading branch information
peterpeterparker committed Nov 16, 2023
1 parent ffd97d0 commit d288de9
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 89 deletions.
6 changes: 1 addition & 5 deletions src/observatory/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ mod guards;
mod reports;
mod store;
mod types;
mod upgrade;

use crate::console::assert_mission_control_center;
use crate::constants::CRON_INTERVAL_NS;
Expand All @@ -19,7 +18,6 @@ use crate::store::{
};
use crate::types::interface::{ListStatuses, ListStatusesArgs, SetCronTab};
use crate::types::state::{Archive, ArchiveStatuses, CronTab, StableState, State};
use crate::upgrade::types::upgrade::UpgradeStableState;
use ic_cdk::storage::{stable_restore, stable_save};
use ic_cdk::{caller, trap};
use ic_cdk_macros::{export_candid, init, post_upgrade, pre_upgrade, query, update};
Expand Down Expand Up @@ -58,9 +56,7 @@ fn pre_upgrade() {

#[post_upgrade]
fn post_upgrade() {
let (upgrade_stable,): (UpgradeStableState,) = stable_restore().unwrap();

let stable = StableState::from(&upgrade_stable);
let (stable,): (StableState,) = stable_restore().unwrap();

STATE.with(|state| *state.borrow_mut() = State { stable });

Expand Down
43 changes: 0 additions & 43 deletions src/observatory/src/upgrade/impls.rs

This file was deleted.

2 changes: 0 additions & 2 deletions src/observatory/src/upgrade/mod.rs

This file was deleted.

39 changes: 0 additions & 39 deletions src/observatory/src/upgrade/types.rs

This file was deleted.

0 comments on commit d288de9

Please sign in to comment.