junobuild-satellite 0.0.21

Extend Juno satellite functionality.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::storage::certified_assets::runtime::init_certified_assets as init_runtime_certified_assets;
use ic_cdk::spawn;
use ic_cdk_timers::set_timer;
use std::time::Duration;

/// If required, building the certification asset hashes is something we can also initiate "manually."
/// This is why we can avoid blocking the post_upgrade process. That way, the execution instructions are specifically scoped to the operation.
pub fn defer_init_certified_assets() {
    set_timer(Duration::ZERO, || spawn(init_certified_assets()));
}

async fn init_certified_assets() {
    init_runtime_certified_assets();
}