diff --git a/crates/service/job/seedance2_pro_job/src/jobs/video_polling_job/video_polling_main_loop.rs b/crates/service/job/seedance2_pro_job/src/jobs/video_polling_job/video_polling_main_loop.rs index 1bfe4651dc..c3331ea422 100644 --- a/crates/service/job/seedance2_pro_job/src/jobs/video_polling_job/video_polling_main_loop.rs +++ b/crates/service/job/seedance2_pro_job/src/jobs/video_polling_job/video_polling_main_loop.rs @@ -134,8 +134,8 @@ async fn run_poll_iteration(deps: &JobDependencies) -> anyhow::Result<()> { let order_age = Utc::now() - last_order_created; let too_old = order_age > *max_age; if too_old { - info!("Last order on page {} is {} days old (threshold: {} days). Stopping pagination.", - total_page_number, order_age.num_days(), max_age.num_days()); + info!("Last order on page {} is {} hours old (threshold: {} hours). Stopping pagination.", + total_page_number, order_age.num_hours(), max_age.num_hours()); exceeded_max_age = true; } } diff --git a/crates/service/job/seedance2_pro_job/src/main.rs b/crates/service/job/seedance2_pro_job/src/main.rs index 13d5af636a..ba455db552 100644 --- a/crates/service/job/seedance2_pro_job/src/main.rs +++ b/crates/service/job/seedance2_pro_job/src/main.rs @@ -43,6 +43,7 @@ const ENV_REGION_NAME: &str = "REGION_NAME"; const ENV_PUBLIC_BUCKET_NAME: &str = "PUBLIC_BUCKET_NAME"; const ENV_S3_ENDPOINT: &str = "S3_COMPATIBLE_ENDPOINT_URL"; const ENV_SEEDANCE2PRO_COOKIES : &str = "SEEDANCE2PRO_COOKIES"; +const ENV_MAX_JOB_AGE_THRESHOLD_HOURS: &str = "MAX_JOB_AGE_THRESHOLD_HOURS"; #[tokio::main] async fn main() -> AnyhowResult<()> { @@ -113,11 +114,11 @@ async fn main() -> AnyhowResult<()> { info!("Batch page count: {}", count); } - let maybe_max_job_age = easyenv::try_get_env_num_optional::("MAX_JOB_AGE_THRESHOLD_DAYS")? - .and_then(chrono::Duration::try_days); + let maybe_max_job_age = easyenv::try_get_env_num_optional::(ENV_MAX_JOB_AGE_THRESHOLD_HOURS)? + .and_then(chrono::Duration::try_hours); if let Some(ref duration) = maybe_max_job_age { - info!("Max job age threshold: {} days", duration.num_days()); + info!("Max job age threshold: {} hours", duration.num_hours()); } let (pager, pager_worker) = build_pager(server_environment, &container_environment.hostname);