Skip to content

Commit 222c2fb

Browse files
docs(pre-compute-app): improve documentation for start_with_app workflow
1 parent c039b70 commit 222c2fb

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/compute/app_runner.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,17 @@ pub enum ExitMode {
3333
/// ```
3434
/// use crate::app_runner::start;
3535
/// use crate::pre_compute_app::PreComputeApp;
36+
///
37+
/// let chain_task_id = ;
38+
/// let pre_compute_args = match PreComputeArgs::read_args() {
39+
/// Ok(pre_compute_args) => pre_compute_args,
40+
/// Err(_) => {
41+
/// return ExitMode::InitializationFailure;
42+
/// }
43+
/// };
3644
///
37-
/// let pre_compute_app = PreComputeApp::new();
38-
/// let exit_code = start_with_app(pre_compute_app);
45+
/// let pre_compute_app = PreComputeApp::new(pre_compute_args, chain_task_id);
46+
/// let exit_code = start_with_app(&pre_compute_app, &chain_task_id)
3947
/// ```
4048
pub fn start_with_app<A: PreComputeAppTrait>(pre_compute_app: &A, chain_task_id: &str) -> ExitMode {
4149
let exit_cause = ReplicateStatusCause::PreComputeFailedUnknownIssue;

0 commit comments

Comments
 (0)