mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-13 00:02:41 +10:00
style(downloads): Added GAME_PAUSE_CHECK_INTERVAL value
Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
use crate::auth::generate_authorization_header;
|
use crate::{auth::generate_authorization_header, GAME_PAUSE_CHECK_INTERVAL};
|
||||||
use crate::db::DatabaseImpls;
|
use crate::db::DatabaseImpls;
|
||||||
use crate::downloads::manifest::DropDownloadContext;
|
use crate::downloads::manifest::DropDownloadContext;
|
||||||
use crate::DB;
|
use crate::DB;
|
||||||
@ -78,7 +78,7 @@ impl DropFileWriter {
|
|||||||
}
|
}
|
||||||
GameDownloadState::Paused => {
|
GameDownloadState::Paused => {
|
||||||
info!("Game download paused");
|
info!("Game download paused");
|
||||||
sleep(Duration::from_secs(1));
|
sleep(GAME_PAUSE_CHECK_INTERVAL);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
None
|
None
|
||||||
|
|||||||
@ -19,12 +19,15 @@ use log::info;
|
|||||||
use remote::{gen_drop_url, use_remote};
|
use remote::{gen_drop_url, use_remote};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
use std::time::Duration;
|
||||||
use std::{
|
use std::{
|
||||||
collections::HashMap,
|
collections::HashMap,
|
||||||
sync::{LazyLock, Mutex},
|
sync::{LazyLock, Mutex},
|
||||||
};
|
};
|
||||||
use tauri_plugin_deep_link::DeepLinkExt;
|
use tauri_plugin_deep_link::DeepLinkExt;
|
||||||
|
|
||||||
|
pub const GAME_PAUSE_CHECK_INTERVAL: Duration = Duration::from_secs(1);
|
||||||
|
|
||||||
#[derive(Clone, Copy, Serialize)]
|
#[derive(Clone, Copy, Serialize)]
|
||||||
pub enum AppStatus {
|
pub enum AppStatus {
|
||||||
NotConfigured,
|
NotConfigured,
|
||||||
|
|||||||
Reference in New Issue
Block a user