/// Download region page (retry 5 times)
Download region page (retry 5 times)
Download region page ( retry 5 times )
fn download_region_market_page(region_id: RegionID,
                               client: esi::Client,
                               page: u32)
                               -> thread::JoinHandle<Result<Vec<Order>>> {
    thread::spawn(move || {
        let mut tries_remaining = 5;
        let mut data: Result<Vec<Order>> = Ok(Vec::new());
        while tries_remaining > 0 {
            tries_remaining -= 1;
            data = client.get_orders(region_id, page);
            if data.is_ok() {
                break;
            }
            thread::sleep(time::Duration::from_millis(500));
        }
        data
    })
}
fn download_region_market_page ( region_id : RegionID , client : esi :: Client , page : u32 ) -> thread :: JoinHandle < Result < Vec < Order > > > { thread :: spawn ( move | | { let mut tries_remaining = 5 ; let mut data : Result < Vec < Order > > = Ok ( Vec :: new ( ) ) ; while tries_remaining > 0 { tries_remaining -= 1 ; data = client . get_orders ( region_id , page ) ; if data . is_ok ( ) { break ; } thread :: sleep ( time :: Duration :: from_millis ( 500 ) ) ; } data } ) }
Download region page (retry 5 times)
Download region page ( retry 5 times )
region_id
RegionID
client
esi::Client
page
u32