@@ -6,7 +6,7 @@ use crate::{
66 uniffi:: {
77 error:: { Kind , OrcaError , Result , selector} ,
88 model:: pod:: { PodJob , PodResult } ,
9- orchestrator:: { ImageKind , Orchestrator , PodRun , PodRunInfo , PodStatus , Status } ,
9+ orchestrator:: { ImageKind , Orchestrator , PodRun , PodRunInfo , PodStatus } ,
1010 } ,
1111} ;
1212use async_trait;
@@ -19,14 +19,8 @@ use bollard::{
1919use derive_more:: Display ;
2020use futures_util:: stream:: { StreamExt as _, TryStreamExt as _} ;
2121use snafu:: { OptionExt as _, futures:: TryFutureExt as _} ;
22- use std:: {
23- backtrace:: Backtrace , collections:: HashMap , path:: PathBuf , sync:: Arc , time:: Duration ,
24- time:: Duration ,
25- } ;
26- use tokio:: {
27- time:: sleep as async_sleep,
28- { fs:: File , time:: sleep} ,
29- } ;
22+ use std:: { backtrace:: Backtrace , collections:: HashMap , path:: PathBuf , sync:: Arc , time:: Duration } ;
23+ use tokio:: { fs:: File , time:: sleep as async_sleep} ;
3024use tokio_util:: {
3125 bytes:: { Bytes , BytesMut } ,
3226 codec:: { BytesCodec , FramedRead } ,
@@ -47,18 +41,18 @@ pub struct LocalDockerOrchestrator {
4741impl Orchestrator for LocalDockerOrchestrator {
4842 fn start_with_altimage_blocking (
4943 & self ,
50- namespace_lookup : & HashMap < String , PathBuf > ,
5144 pod_job : & PodJob ,
5245 image : & ImageKind ,
46+ namespace_lookup : & HashMap < String , PathBuf > ,
5347 ) -> Result < PodRun > {
54- ASYNC_RUNTIME . block_on ( self . start_with_altimage ( namespace_lookup , pod_job, image) )
48+ ASYNC_RUNTIME . block_on ( self . start_with_altimage ( pod_job, image, namespace_lookup ) )
5549 }
5650 fn start_blocking (
5751 & self ,
58- namespace_lookup : & HashMap < String , PathBuf > ,
5952 pod_job : & PodJob ,
53+ namespace_lookup : & HashMap < String , PathBuf > ,
6054 ) -> Result < PodRun > {
61- ASYNC_RUNTIME . block_on ( self . start ( namespace_lookup , pod_job ) )
55+ ASYNC_RUNTIME . block_on ( self . start ( pod_job , namespace_lookup ) )
6256 }
6357 fn list_blocking ( & self ) -> Result < Vec < PodRun > > {
6458 ASYNC_RUNTIME . block_on ( self . list ( ) )
@@ -71,10 +65,10 @@ impl Orchestrator for LocalDockerOrchestrator {
7165 }
7266 fn get_result_blocking (
7367 & self ,
74- namespace_lookup : & HashMap < String , PathBuf > ,
7568 pod_run : & PodRun ,
69+ namespace_lookup : & HashMap < String , PathBuf > ,
7670 ) -> Result < PodResult > {
77- ASYNC_RUNTIME . block_on ( self . get_result ( namespace_lookup , pod_run ) )
71+ ASYNC_RUNTIME . block_on ( self . get_result ( pod_run , namespace_lookup ) )
7872 }
7973 #[ expect(
8074 clippy:: try_err,
@@ -86,9 +80,9 @@ impl Orchestrator for LocalDockerOrchestrator {
8680 ) ]
8781 async fn start_with_altimage (
8882 & self ,
89- namespace_lookup : & HashMap < String , PathBuf > ,
9083 pod_job : & PodJob ,
9184 image : & ImageKind ,
85+ namespace_lookup : & HashMap < String , PathBuf > ,
9286 ) -> Result < PodRun > {
9387 let ( assigned_name, container_options, container_config) = match image {
9488 ImageKind :: Published ( remote_image) => Self :: prepare_container_start_inputs (
@@ -155,8 +149,8 @@ impl Orchestrator for LocalDockerOrchestrator {
155149 }
156150 async fn start (
157151 & self ,
158- namespace_lookup : & HashMap < String , PathBuf > ,
159152 pod_job : & PodJob ,
153+ namespace_lookup : & HashMap < String , PathBuf > ,
160154 ) -> Result < PodRun > {
161155 let image_options = Some ( CreateImageOptions {
162156 from_image : pod_job. pod . image . clone ( ) ,
@@ -167,9 +161,9 @@ impl Orchestrator for LocalDockerOrchestrator {
167161 . try_collect :: < Vec < _ > > ( )
168162 . await ?;
169163 self . start_with_altimage (
170- namespace_lookup,
171164 pod_job,
172165 & ImageKind :: Published ( pod_job. pod . image . clone ( ) ) ,
166+ namespace_lookup,
173167 )
174168 . await
175169 }
@@ -232,8 +226,8 @@ impl Orchestrator for LocalDockerOrchestrator {
232226 ) ]
233227 async fn get_result (
234228 & self ,
235- namespace_lookup : & HashMap < String , PathBuf > ,
236229 pod_run : & PodRun ,
230+ namespace_lookup : & HashMap < String , PathBuf > ,
237231 ) -> Result < PodResult > {
238232 match self
239233 . api
0 commit comments