diff --git a/Cargo.lock b/Cargo.lock index 939ee102a..1e023e62b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1454,6 +1454,7 @@ name = "container_common" version = "0.0.1" dependencies = [ "anyhow", + "errors", "my-workspace-hack", "once_cell", "rand 0.8.5", @@ -2863,6 +2864,7 @@ version = "0.0.1" dependencies = [ "anyhow", "container_common", + "errors", "log", "my-workspace-hack", "subprocess_common", @@ -5530,6 +5532,7 @@ version = "0.0.1" dependencies = [ "anyhow", "container_common", + "errors", "my-workspace-hack", "serde", "serde_derive", @@ -7757,6 +7760,7 @@ dependencies = [ "dotenv", "easyenv", "enums", + "errors", "filesys", "google_drive_common", "hashing", @@ -7788,6 +7792,7 @@ dependencies = [ "container_common", "dotenv", "easyenv", + "errors", "filesys", "hashing", "hostname 0.4.0", @@ -8081,6 +8086,7 @@ dependencies = [ "container_common", "dotenv", "easyenv", + "errors", "filesys", "google_drive_common", "hashing", @@ -8111,6 +8117,7 @@ dependencies = [ "container_common", "dotenv", "easyenv", + "errors", "filesys", "google_drive_common", "hostname 0.4.0", diff --git a/crates/lib/api_clients/google_drive_common/Cargo.toml b/crates/lib/api_clients/google_drive_common/Cargo.toml index 1233b6ecd..b0df22f56 100644 --- a/crates/lib/api_clients/google_drive_common/Cargo.toml +++ b/crates/lib/api_clients/google_drive_common/Cargo.toml @@ -18,6 +18,7 @@ normal = ["my-workspace-hack"] [dependencies] # Internal +errors = { path = "../../errors" } container_common = { path = "../../deprecated/container_common" } subprocess_common = { path = "../../subprocess_common" } diff --git a/crates/lib/api_clients/google_drive_common/src/google_drive_download_command.rs b/crates/lib/api_clients/google_drive_common/src/google_drive_download_command.rs index 56ab8d493..62b4c43d3 100644 --- a/crates/lib/api_clients/google_drive_common/src/google_drive_download_command.rs +++ b/crates/lib/api_clients/google_drive_common/src/google_drive_download_command.rs @@ -4,8 +4,8 @@ use anyhow::anyhow; use log::info; use tempdir::TempDir; -use container_common::anyhow_result::AnyhowResult; use container_common::token::random_crockford_token::random_crockford_token; +use errors::AnyhowResult; use subprocess_common::docker_options::DockerOptions; /// This is a Python script that uses the `gdown` package to download from Google Drive. diff --git a/crates/lib/deprecated/container_common/Cargo.toml b/crates/lib/deprecated/container_common/Cargo.toml index 3d745a3dc..44738b04e 100644 --- a/crates/lib/deprecated/container_common/Cargo.toml +++ b/crates/lib/deprecated/container_common/Cargo.toml @@ -16,6 +16,8 @@ path = "src/lib.rs" normal = ["my-workspace-hack"] [dependencies] +# Internal +errors = { path = "../../errors" } # External anyhow = "1.0.86" diff --git a/crates/lib/deprecated/container_common/src/anyhow_result.rs b/crates/lib/deprecated/container_common/src/anyhow_result.rs deleted file mode 100644 index 778437463..000000000 --- a/crates/lib/deprecated/container_common/src/anyhow_result.rs +++ /dev/null @@ -1,2 +0,0 @@ -/// Easier to import than anyhow::Result. -pub type AnyhowResult = anyhow::Result; diff --git a/crates/lib/deprecated/container_common/src/files/read_toml_file_to_struct.rs b/crates/lib/deprecated/container_common/src/files/read_toml_file_to_struct.rs index f2308920b..506885530 100644 --- a/crates/lib/deprecated/container_common/src/files/read_toml_file_to_struct.rs +++ b/crates/lib/deprecated/container_common/src/files/read_toml_file_to_struct.rs @@ -4,7 +4,7 @@ use std::path::Path; use serde::de::DeserializeOwned; -use crate::anyhow_result::AnyhowResult; +use errors::AnyhowResult; /// Read a TOML file into a struct. pub fn read_toml_file_to_struct(filename: P) -> AnyhowResult diff --git a/crates/lib/deprecated/container_common/src/lib.rs b/crates/lib/deprecated/container_common/src/lib.rs index 99dae25ed..49ceff5a6 100644 --- a/crates/lib/deprecated/container_common/src/lib.rs +++ b/crates/lib/deprecated/container_common/src/lib.rs @@ -1,4 +1,3 @@ -pub mod anyhow_result; pub mod files; pub mod i18n; pub mod numerics; diff --git a/crates/lib/deprecated/container_common/src/thread/async_thread_kill_signal.rs b/crates/lib/deprecated/container_common/src/thread/async_thread_kill_signal.rs index 2843fcc8c..27a17eac0 100644 --- a/crates/lib/deprecated/container_common/src/thread/async_thread_kill_signal.rs +++ b/crates/lib/deprecated/container_common/src/thread/async_thread_kill_signal.rs @@ -3,7 +3,7 @@ use std::time::{Duration, Instant}; use anyhow::anyhow; -use crate::anyhow_result::AnyhowResult; +use errors::AnyhowResult; /// Sometimes I need to kill a thread from somewhere else. This is a mechanism /// that enables it. This utility can be combined with logic that will kill a diff --git a/crates/lib/redis_common/Cargo.toml b/crates/lib/redis_common/Cargo.toml index 20f7ba5b6..d5d7821bf 100644 --- a/crates/lib/redis_common/Cargo.toml +++ b/crates/lib/redis_common/Cargo.toml @@ -18,6 +18,7 @@ normal = ["my-workspace-hack"] [dependencies] # Internal +errors = { path = "../errors" } container_common = { path = "../deprecated/container_common" } # Workspace hack (faster compile times) diff --git a/crates/lib/redis_common/src/payloads/lease_payload.rs b/crates/lib/redis_common/src/payloads/lease_payload.rs index 228722d65..d273ebdbf 100644 --- a/crates/lib/redis_common/src/payloads/lease_payload.rs +++ b/crates/lib/redis_common/src/payloads/lease_payload.rs @@ -1,8 +1,8 @@ use anyhow::anyhow; -use container_common::anyhow_result::AnyhowResult; use container_common::thread::thread_id::ThreadId; use container_common::token::random_crockford_token::random_crockford_token; +use errors::AnyhowResult; // TODO: Rename, document diff --git a/crates/lib/redis_common/src/payloads/obs_active_payload.rs b/crates/lib/redis_common/src/payloads/obs_active_payload.rs index cca115455..4ae567946 100644 --- a/crates/lib/redis_common/src/payloads/obs_active_payload.rs +++ b/crates/lib/redis_common/src/payloads/obs_active_payload.rs @@ -1,7 +1,8 @@ -use container_common::anyhow_result::AnyhowResult; // TODO: Rename, document +use errors::AnyhowResult; + #[derive(Serialize, Deserialize, Debug)] pub struct ObsActivePayload { pub twitch_user_id: String, diff --git a/crates/service/job/download_job/src/job_loop/main_loop.rs b/crates/service/job/download_job/src/job_loop/main_loop.rs index 54ee112e8..6cd4f2627 100644 --- a/crates/service/job/download_job/src/job_loop/main_loop.rs +++ b/crates/service/job/download_job/src/job_loop/main_loop.rs @@ -3,7 +3,7 @@ use std::time::Duration; use anyhow::anyhow; use log::{error, warn}; -use container_common::anyhow_result::AnyhowResult; +use errors::AnyhowResult; use jobs_common::noop_logger::NoOpLogger; use mysql_queries::queries::generic_download::job::list_available_generic_download_jobs::{AvailableDownloadJob, list_available_generic_download_jobs}; use mysql_queries::queries::generic_download::job::mark_generic_download_job_failure::mark_generic_download_job_failure; diff --git a/crates/service/job/download_job/src/job_loop/process_single_job.rs b/crates/service/job/download_job/src/job_loop/process_single_job.rs index f07f675fe..adce05827 100644 --- a/crates/service/job/download_job/src/job_loop/process_single_job.rs +++ b/crates/service/job/download_job/src/job_loop/process_single_job.rs @@ -5,7 +5,7 @@ use log::{info, warn}; use tempdir::TempDir; use config::is_bad_download_url::is_bad_download_url; -use container_common::anyhow_result::AnyhowResult; +use errors::AnyhowResult; use filesys::file_deletion::safe_delete_directory::safe_delete_directory; use jobs_common::redis_job_status_logger::RedisJobStatusLogger; use mysql_queries::queries::generic_download::job::list_available_generic_download_jobs::AvailableDownloadJob; diff --git a/crates/service/job/download_job/src/job_types/dispatch_job_to_handler.rs b/crates/service/job/download_job/src/job_types/dispatch_job_to_handler.rs index 7380e49dc..f4e3129d9 100644 --- a/crates/service/job/download_job/src/job_types/dispatch_job_to_handler.rs +++ b/crates/service/job/download_job/src/job_types/dispatch_job_to_handler.rs @@ -1,7 +1,7 @@ use tempdir::TempDir; -use container_common::anyhow_result::AnyhowResult; use enums::by_table::generic_download_jobs::generic_download_type::GenericDownloadType; +use errors::AnyhowResult; use jobs_common::redis_job_status_logger::RedisJobStatusLogger; use mysql_queries::queries::generic_download::job::list_available_generic_download_jobs::AvailableDownloadJob; diff --git a/crates/service/job/download_job/src/job_types/tts/vits/vits_model_check_command.rs b/crates/service/job/download_job/src/job_types/tts/vits/vits_model_check_command.rs index 3799ad225..408c73057 100644 --- a/crates/service/job/download_job/src/job_types/tts/vits/vits_model_check_command.rs +++ b/crates/service/job/download_job/src/job_types/tts/vits/vits_model_check_command.rs @@ -3,7 +3,7 @@ use std::path::{Path, PathBuf}; use log::info; use subprocess::{Popen, PopenConfig}; -use container_common::anyhow_result::AnyhowResult; +use errors::AnyhowResult; use filesys::path_to_string::path_to_string; use subprocess_common::docker_options::DockerOptions; diff --git a/crates/service/job/download_job/src/job_types/voice_conversion/rvc_v2/rvc_v2_model_check_command.rs b/crates/service/job/download_job/src/job_types/voice_conversion/rvc_v2/rvc_v2_model_check_command.rs index fa1b4c39e..9d97fba90 100644 --- a/crates/service/job/download_job/src/job_types/voice_conversion/rvc_v2/rvc_v2_model_check_command.rs +++ b/crates/service/job/download_job/src/job_types/voice_conversion/rvc_v2/rvc_v2_model_check_command.rs @@ -4,7 +4,7 @@ use anyhow::anyhow; use log::info; use subprocess::{Popen, PopenConfig}; -use container_common::anyhow_result::AnyhowResult; +use errors::AnyhowResult; use filesys::path_to_string::path_to_string; use subprocess_common::docker_options::{DockerFilesystemMount, DockerGpu, DockerOptions}; diff --git a/crates/service/job/download_job/src/job_types/voice_conversion/so_vits_svc/so_vits_svc_model_check_command.rs b/crates/service/job/download_job/src/job_types/voice_conversion/so_vits_svc/so_vits_svc_model_check_command.rs index 828009b91..0060184ad 100644 --- a/crates/service/job/download_job/src/job_types/voice_conversion/so_vits_svc/so_vits_svc_model_check_command.rs +++ b/crates/service/job/download_job/src/job_types/voice_conversion/so_vits_svc/so_vits_svc_model_check_command.rs @@ -5,7 +5,7 @@ use anyhow::anyhow; use log::info; use subprocess::{Popen, PopenConfig}; -use container_common::anyhow_result::AnyhowResult; +use errors::AnyhowResult; use filesys::path_to_string::path_to_string; use subprocess_common::docker_options::{DockerFilesystemMount, DockerGpu, DockerOptions}; diff --git a/crates/service/job/tts_download_job/Cargo.toml b/crates/service/job/tts_download_job/Cargo.toml index 1f7c36089..3676bdf7e 100644 --- a/crates/service/job/tts_download_job/Cargo.toml +++ b/crates/service/job/tts_download_job/Cargo.toml @@ -23,6 +23,7 @@ config = { path = "../../../lib/deprecated/config" } container_common = { path = "../../../lib/deprecated/container_common" } easyenv = { path = "../../../lib/easyenv" } enums = { path = "../../../_types/enums" } +errors = { path = "../../../lib/errors" } filesys = { path = "../../../lib/files/filesys" } google_drive_common = { path = "../../../lib/api_clients/google_drive_common" } hashing = { path = "../../../lib/files/hashing" } diff --git a/crates/service/job/tts_download_job/src/main.rs b/crates/service/job/tts_download_job/src/main.rs index 3890a354f..5779fbd55 100644 --- a/crates/service/job/tts_download_job/src/main.rs +++ b/crates/service/job/tts_download_job/src/main.rs @@ -35,8 +35,8 @@ use config::bad_urls::is_bad_tts_model_download_url; use config::common_env::CommonEnv; use config::shared_constants::DEFAULT_MYSQL_CONNECTION_STRING; use config::shared_constants::DEFAULT_RUST_LOG; -use container_common::anyhow_result::AnyhowResult; use enums::by_table::tts_models::tts_model_type::TtsModelType; +use errors::AnyhowResult; use filesys::check_directory_exists::check_directory_exists; use filesys::check_file_exists::check_file_exists; use filesys::file_deletion::safe_delete_directory::safe_delete_directory; diff --git a/crates/service/job/tts_download_job/src/script_execution/tacotron_model_check_command.rs b/crates/service/job/tts_download_job/src/script_execution/tacotron_model_check_command.rs index e076b3dd7..2948146ca 100644 --- a/crates/service/job/tts_download_job/src/script_execution/tacotron_model_check_command.rs +++ b/crates/service/job/tts_download_job/src/script_execution/tacotron_model_check_command.rs @@ -4,7 +4,7 @@ use std::path::Path; use log::info; use subprocess::{Popen, PopenConfig, Redirection}; -use crate::AnyhowResult; +use errors::AnyhowResult; /// This command is used to check tacotron for being a real model #[derive(Clone)] diff --git a/crates/service/job/tts_download_job/src/script_execution/talknet_model_check_command.rs b/crates/service/job/tts_download_job/src/script_execution/talknet_model_check_command.rs index b1c9fd293..b6fe473cb 100644 --- a/crates/service/job/tts_download_job/src/script_execution/talknet_model_check_command.rs +++ b/crates/service/job/tts_download_job/src/script_execution/talknet_model_check_command.rs @@ -4,7 +4,7 @@ use std::path::Path; use log::info; use subprocess::{Popen, PopenConfig, Redirection}; -use crate::AnyhowResult; +use errors::AnyhowResult; /// This command is used to check talknet for being a real model #[derive(Clone)] diff --git a/crates/service/job/tts_inference_job/Cargo.toml b/crates/service/job/tts_inference_job/Cargo.toml index 48908feef..a879dcef6 100644 --- a/crates/service/job/tts_inference_job/Cargo.toml +++ b/crates/service/job/tts_inference_job/Cargo.toml @@ -23,6 +23,7 @@ collections = { path = "../../../lib/data/collections" } config = { path = "../../../lib/deprecated/config" } container_common = { path = "../../../lib/deprecated/container_common" } easyenv = { path = "../../../lib/easyenv" } +errors = { path = "../../../lib/errors" } filesys = { path = "../../../lib/files/filesys" } hashing = { path = "../../../lib/files/hashing" } jobs_common = { path = "../../../lib/jobs_common" } diff --git a/crates/service/job/tts_inference_job/src/caching/cache_miss_strategizer_multi.rs b/crates/service/job/tts_inference_job/src/caching/cache_miss_strategizer_multi.rs index ec8aee25e..4c63d714a 100644 --- a/crates/service/job/tts_inference_job/src/caching/cache_miss_strategizer_multi.rs +++ b/crates/service/job/tts_inference_job/src/caching/cache_miss_strategizer_multi.rs @@ -2,7 +2,7 @@ use std::sync::{Arc, RwLock}; use anyhow::anyhow; -use container_common::anyhow_result::AnyhowResult; +use errors::AnyhowResult; use crate::caching::cache_miss_strategizer::{CacheMissStrategizer, CacheMissStrategy}; diff --git a/crates/service/job/tts_inference_job/src/caching/virtual_lfu_cache.rs b/crates/service/job/tts_inference_job/src/caching/virtual_lfu_cache.rs index 2512bfdb4..c57c04c38 100644 --- a/crates/service/job/tts_inference_job/src/caching/virtual_lfu_cache.rs +++ b/crates/service/job/tts_inference_job/src/caching/virtual_lfu_cache.rs @@ -4,7 +4,7 @@ use std::sync::{Arc, RwLock}; use anyhow::anyhow; use lfu::LFUCache; -use container_common::anyhow_result::AnyhowResult; +use errors::AnyhowResult; /// This stands in front of the python HTTP sidecar and controls which /// models get to remain in memory. The Python sidecar keeps multiple diff --git a/crates/service/job/tts_inference_job/src/http_clients/tts_inference_sidecar_client.rs b/crates/service/job/tts_inference_job/src/http_clients/tts_inference_sidecar_client.rs index 829a151b5..53595b2a9 100644 --- a/crates/service/job/tts_inference_job/src/http_clients/tts_inference_sidecar_client.rs +++ b/crates/service/job/tts_inference_job/src/http_clients/tts_inference_sidecar_client.rs @@ -4,7 +4,7 @@ use anyhow::anyhow; use log::info; use reqwest::Client; -use container_common::anyhow_result::AnyhowResult; +use errors::AnyhowResult; use mysql_queries::column_types::vocoder_type::VocoderType; pub struct TtsInferenceSidecarClient { diff --git a/crates/service/job/tts_inference_job/src/http_clients/tts_sidecar_health_check_client.rs b/crates/service/job/tts_inference_job/src/http_clients/tts_sidecar_health_check_client.rs index 4353da4fa..9371952f1 100644 --- a/crates/service/job/tts_inference_job/src/http_clients/tts_sidecar_health_check_client.rs +++ b/crates/service/job/tts_inference_job/src/http_clients/tts_sidecar_health_check_client.rs @@ -3,7 +3,7 @@ use std::str::FromStr; use log::info; use reqwest::{Client, Url}; -use container_common::anyhow_result::AnyhowResult; +use errors::AnyhowResult; // TODO(bt): As more microservices adopt a common health check protocol, // it may make sense to make this a common library. diff --git a/crates/service/job/tts_inference_job/src/job_steps/process_single_job.rs b/crates/service/job/tts_inference_job/src/job_steps/process_single_job.rs index 68c976c51..93cf5fc77 100644 --- a/crates/service/job/tts_inference_job/src/job_steps/process_single_job.rs +++ b/crates/service/job/tts_inference_job/src/job_steps/process_single_job.rs @@ -12,7 +12,7 @@ use anyhow::anyhow; use log::{error, info, warn}; use tempdir::TempDir; -use container_common::anyhow_result::AnyhowResult; +use errors::AnyhowResult; use filesys::check_file_exists::check_file_exists; use filesys::file_deletion::safe_delete_directory::safe_delete_directory; use filesys::file_deletion::safe_delete_file::safe_delete_file; diff --git a/crates/service/job/tts_inference_job/src/main.rs b/crates/service/job/tts_inference_job/src/main.rs index b366fcfce..8abdba9ea 100644 --- a/crates/service/job/tts_inference_job/src/main.rs +++ b/crates/service/job/tts_inference_job/src/main.rs @@ -31,7 +31,7 @@ use collections::multiple_random_from_vec::multiple_random_from_vec; use config::common_env::CommonEnv; use config::shared_constants::DEFAULT_MYSQL_CONNECTION_STRING; use config::shared_constants::DEFAULT_RUST_LOG; -use container_common::anyhow_result::AnyhowResult; +use errors::AnyhowResult; use filesys::check_directory_exists::check_directory_exists; use jobs_common::job_progress_reporter::job_progress_reporter::JobProgressReporterBuilder; use jobs_common::job_progress_reporter::noop_job_progress_reporter::NoOpJobProgressReporterBuilder; diff --git a/crates/service/job/w2l_download_job/Cargo.toml b/crates/service/job/w2l_download_job/Cargo.toml index ceb97697e..112dfdd47 100644 --- a/crates/service/job/w2l_download_job/Cargo.toml +++ b/crates/service/job/w2l_download_job/Cargo.toml @@ -23,6 +23,7 @@ cloud_storage = { path = "../../../lib/api_clients/cloud_storage" } config = { path = "../../../lib/deprecated/config" } container_common = { path = "../../../lib/deprecated/container_common" } easyenv = { path = "../../../lib/easyenv" } +errors = { path = "../../../lib/errors" } filesys = { path = "../../../lib/files/filesys" } google_drive_common = { path = "../../../lib/api_clients/google_drive_common" } hashing = { path = "../../../lib/files/hashing" } diff --git a/crates/service/job/w2l_download_job/src/main.rs b/crates/service/job/w2l_download_job/src/main.rs index 4b054d5c8..c82c14e4e 100644 --- a/crates/service/job/w2l_download_job/src/main.rs +++ b/crates/service/job/w2l_download_job/src/main.rs @@ -34,7 +34,7 @@ use config::common_env::CommonEnv; use config::is_bad_video_download_url::is_bad_video_download_url; use config::shared_constants::DEFAULT_MYSQL_CONNECTION_STRING; use config::shared_constants::DEFAULT_RUST_LOG; -use container_common::anyhow_result::AnyhowResult; +use errors::AnyhowResult; use filesys::check_directory_exists::check_directory_exists; use filesys::check_file_exists::check_file_exists; use filesys::file_deletion::safe_delete_directory::safe_delete_directory; diff --git a/crates/service/job/w2l_download_job/src/script_execution/ffmpeg_generate_preview_image_command.rs b/crates/service/job/w2l_download_job/src/script_execution/ffmpeg_generate_preview_image_command.rs index a3e04ebcb..5cb9326ed 100644 --- a/crates/service/job/w2l_download_job/src/script_execution/ffmpeg_generate_preview_image_command.rs +++ b/crates/service/job/w2l_download_job/src/script_execution/ffmpeg_generate_preview_image_command.rs @@ -3,7 +3,7 @@ use std::fs::OpenOptions; use log::info; use subprocess::{Popen, PopenConfig, Redirection}; -use crate::AnyhowResult; +use errors::AnyhowResult; /// This command is used to generate ffmpeg previews for videos. #[derive(Clone)] diff --git a/crates/service/job/w2l_download_job/src/script_execution/ffmpeg_generate_preview_video_command.rs b/crates/service/job/w2l_download_job/src/script_execution/ffmpeg_generate_preview_video_command.rs index d0375c4b5..261b73f08 100644 --- a/crates/service/job/w2l_download_job/src/script_execution/ffmpeg_generate_preview_video_command.rs +++ b/crates/service/job/w2l_download_job/src/script_execution/ffmpeg_generate_preview_video_command.rs @@ -3,7 +3,7 @@ use std::fs::OpenOptions; use log::info; use subprocess::{Popen, PopenConfig, Redirection}; -use crate::AnyhowResult; +use errors::AnyhowResult; /// This command is used to generate ffmpeg previews for videos. #[derive(Clone)] diff --git a/crates/service/job/w2l_download_job/src/script_execution/imagemagick_generate_preview_image_command.rs b/crates/service/job/w2l_download_job/src/script_execution/imagemagick_generate_preview_image_command.rs index 49c0e8900..1e632106c 100644 --- a/crates/service/job/w2l_download_job/src/script_execution/imagemagick_generate_preview_image_command.rs +++ b/crates/service/job/w2l_download_job/src/script_execution/imagemagick_generate_preview_image_command.rs @@ -3,7 +3,7 @@ use std::fs::OpenOptions; use log::info; use subprocess::{Popen, PopenConfig, Redirection}; -use crate::AnyhowResult; +use errors::AnyhowResult; /// This command is used to generate ffmpeg previews for videos. #[derive(Clone)] diff --git a/crates/service/job/w2l_download_job/src/script_execution/wav2lip_process_upload_command.rs b/crates/service/job/w2l_download_job/src/script_execution/wav2lip_process_upload_command.rs index d7d027a73..a3792071e 100644 --- a/crates/service/job/w2l_download_job/src/script_execution/wav2lip_process_upload_command.rs +++ b/crates/service/job/w2l_download_job/src/script_execution/wav2lip_process_upload_command.rs @@ -5,7 +5,7 @@ use std::fmt::Formatter; use log::{info, warn}; use subprocess::{ExitStatus, Popen, PopenConfig}; -use crate::AnyhowResult; +use errors::AnyhowResult; /// The python script uses this exit code when face detection fails. const FACE_DETECT_FAILURE_CODE : u32 = 5; diff --git a/crates/service/job/w2l_inference_job/Cargo.toml b/crates/service/job/w2l_inference_job/Cargo.toml index a15d83d70..3aa7e656a 100644 --- a/crates/service/job/w2l_inference_job/Cargo.toml +++ b/crates/service/job/w2l_inference_job/Cargo.toml @@ -22,6 +22,7 @@ cloud_storage = { path = "../../../lib/api_clients/cloud_storage" } config = { path = "../../../lib/deprecated/config" } container_common = { path = "../../../lib/deprecated/container_common" } easyenv = { path = "../../../lib/easyenv" } +errors = { path = "../../../lib/errors" } filesys = { path = "../../../lib/files/filesys" } google_drive_common = { path = "../../../lib/api_clients/google_drive_common" } jobs_common = { path = "../../../lib/jobs_common" } diff --git a/crates/service/job/w2l_inference_job/src/main.rs b/crates/service/job/w2l_inference_job/src/main.rs index c3b706c5b..a06c09f18 100644 --- a/crates/service/job/w2l_inference_job/src/main.rs +++ b/crates/service/job/w2l_inference_job/src/main.rs @@ -36,7 +36,7 @@ use cloud_storage::bucket_path_unifier::BucketPathUnifier; use config::common_env::CommonEnv; use config::shared_constants::DEFAULT_MYSQL_CONNECTION_STRING; use config::shared_constants::DEFAULT_RUST_LOG; -use container_common::anyhow_result::AnyhowResult; +use errors::AnyhowResult; use filesys::check_directory_exists::check_directory_exists; use filesys::check_file_exists::check_file_exists; use filesys::file_deletion::safe_delete_directory::safe_delete_directory; diff --git a/crates/service/job/w2l_inference_job/src/script_execution/wav2lip_inference_command.rs b/crates/service/job/w2l_inference_job/src/script_execution/wav2lip_inference_command.rs index e4d4402d5..6ab1d499e 100644 --- a/crates/service/job/w2l_inference_job/src/script_execution/wav2lip_inference_command.rs +++ b/crates/service/job/w2l_inference_job/src/script_execution/wav2lip_inference_command.rs @@ -4,7 +4,7 @@ use std::path::Path; use log::info; use subprocess::{Popen, PopenConfig, Redirection}; -use crate::AnyhowResult; +use errors::AnyhowResult; /// This command is used to run inference. /// It uses preprocessed face files so that it's much faster. diff --git a/crates/service/web/storyteller_web/src/http_server/web_utils/bucket_urls/bucket_url_from_media_path.rs b/crates/service/web/storyteller_web/src/http_server/web_utils/bucket_urls/bucket_url_from_media_path.rs index 90a7b46c8..eb0f21599 100644 --- a/crates/service/web/storyteller_web/src/http_server/web_utils/bucket_urls/bucket_url_from_media_path.rs +++ b/crates/service/web/storyteller_web/src/http_server/web_utils/bucket_urls/bucket_url_from_media_path.rs @@ -1,7 +1,7 @@ use url::Url; use buckets::public::media_files::bucket_file_path::MediaFileBucketPath; -use container_common::anyhow_result::AnyhowResult; +use errors::AnyhowResult; pub fn bucket_url_from_media_path( bucket_path: &MediaFileBucketPath,