From d4ebbc900c86f224e7c7ab7976b139cfadd6aad2 Mon Sep 17 00:00:00 2001 From: phoenix Date: Mon, 6 Jul 2026 22:38:58 -0400 Subject: [PATCH 1/9] bump: rust ci --- .gitea/workflows/pr.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/pr.yml b/.gitea/workflows/pr.yml index e8365a4..bc74f7e 100644 --- a/.gitea/workflows/pr.yml +++ b/.gitea/workflows/pr.yml @@ -14,10 +14,10 @@ jobs: name: Check runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - toolchain: 1.96 + toolchain: 1.96.1 - uses: Swatinem/rust-cache@v2 - run: | mkdir -p ~/.ssh @@ -33,10 +33,10 @@ jobs: name: Rustfmt runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - toolchain: 1.96 + toolchain: 1.96.1 - run: rustup component add rustfmt - uses: Swatinem/rust-cache@v2 - run: | @@ -53,10 +53,10 @@ jobs: name: Clippy runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - toolchain: 1.96 + toolchain: 1.96.1 - run: rustup component add clippy - uses: Swatinem/rust-cache@v2 - run: | -- 2.47.3 From 35d20dcccc33e2933022f485a256f3651e1d0287 Mon Sep 17 00:00:00 2001 From: phoenix Date: Mon, 6 Jul 2026 22:39:55 -0400 Subject: [PATCH 2/9] bump: rust --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7923636..024f25c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "catapult" version = "0.3.1" -rust-version = "1.96" +rust-version = "1.96.1" edition = "2024" [dependencies] -- 2.47.3 From 705c10514c9dc506c7651deb3e665483f9da21ce Mon Sep 17 00:00:00 2001 From: phoenix Date: Mon, 6 Jul 2026 22:40:11 -0400 Subject: [PATCH 3/9] bump: rust docker --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1f9a801..9659b78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Stage 1: Build the application -FROM rust:1.96 as builder +FROM rust:1.96.1 as builder # Set the working directory inside the container WORKDIR /usr/src/app -- 2.47.3 From aa1c4fce9945e0f4a8ed7df7529a9fcabf37eb06 Mon Sep 17 00:00:00 2001 From: phoenix Date: Mon, 6 Jul 2026 22:40:47 -0400 Subject: [PATCH 4/9] bump: textsender_models --- Cargo.lock | 20 ++++++++++++++++++-- Cargo.toml | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1978443..1bd7c9a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -139,7 +139,7 @@ dependencies = [ "serde", "serde_json", "swoosh", - "textsender_models", + "textsender_models 0.5.1", "time", "tokio", "uuid", @@ -2087,7 +2087,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "textsender_models", + "textsender_models 0.5.0", "time", ] @@ -2172,6 +2172,22 @@ dependencies = [ "uuid", ] +[[package]] +name = "textsender_models" +version = "0.5.1" +source = "git+ssh://git@git.kundeng.us/phoenix/textsender_models.git?tag=v0.5.1#151eeaacf64e255bde56a48df03f4c46ec77c235" +dependencies = [ + "const_format", + "dotenvy", + "josekit", + "serde", + "serde_json", + "sqlx", + "time", + "utoipa", + "uuid", +] + [[package]] name = "thiserror" version = "2.0.18" diff --git a/Cargo.toml b/Cargo.toml index 024f25c..aec7b54 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ serde = { version = "1.0.228", features = ["derive"] } serde_json = { version = "1.0.150" } time = { version = "0.3.53", features = ["formatting", "macros", "parsing", "serde"] } uuid = { version = "1.23.3", features = ["v4", "serde"] } -textsender_models = { git = "ssh://git@git.kundeng.us/phoenix/textsender_models.git", tag = "v0.5.0" } +textsender_models = { git = "ssh://git@git.kundeng.us/phoenix/textsender_models.git", tag = "v0.5.1" } swoosh = { git = "ssh://git@git.kundeng.us/phoenix/swoosh.git", tag = "v0.5.1" } [dev-dependencies] -- 2.47.3 From d4551ebae524dea37ebcc5db0807fe51ebfd8044 Mon Sep 17 00:00:00 2001 From: phoenix Date: Mon, 6 Jul 2026 22:41:10 -0400 Subject: [PATCH 5/9] bump: swoosh --- Cargo.lock | 24 ++++-------------------- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1bd7c9a..9652919 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -139,7 +139,7 @@ dependencies = [ "serde", "serde_json", "swoosh", - "textsender_models 0.5.1", + "textsender_models", "time", "tokio", "uuid", @@ -2080,14 +2080,14 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "swoosh" -version = "0.5.1" -source = "git+ssh://git@git.kundeng.us/phoenix/swoosh.git?tag=v0.5.1#d36483e6f846efd1b0b9bec6aa98194a5494669f" +version = "0.5.2" +source = "git+ssh://git@git.kundeng.us/phoenix/swoosh.git?tag=v0.5.2#50e4b209f521d8985d73a33b4a8f1db69334100a" dependencies = [ "base64-ng", "reqwest", "serde", "serde_json", - "textsender_models 0.5.0", + "textsender_models", "time", ] @@ -2156,22 +2156,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "textsender_models" -version = "0.5.0" -source = "git+ssh://git@git.kundeng.us/phoenix/textsender_models.git?tag=v0.5.0#137398405fbc61acd352530f8cbfd4d98e648e95" -dependencies = [ - "const_format", - "dotenvy", - "josekit", - "serde", - "serde_json", - "sqlx", - "time", - "utoipa", - "uuid", -] - [[package]] name = "textsender_models" version = "0.5.1" diff --git a/Cargo.toml b/Cargo.toml index aec7b54..01f4768 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,6 +13,6 @@ serde_json = { version = "1.0.150" } time = { version = "0.3.53", features = ["formatting", "macros", "parsing", "serde"] } uuid = { version = "1.23.3", features = ["v4", "serde"] } textsender_models = { git = "ssh://git@git.kundeng.us/phoenix/textsender_models.git", tag = "v0.5.1" } -swoosh = { git = "ssh://git@git.kundeng.us/phoenix/swoosh.git", tag = "v0.5.1" } +swoosh = { git = "ssh://git@git.kundeng.us/phoenix/swoosh.git", tag = "v0.5.2" } [dev-dependencies] -- 2.47.3 From 95d94b4c74a69e8847988c274d3de621cdfa19ff Mon Sep 17 00:00:00 2001 From: phoenix Date: Mon, 6 Jul 2026 22:42:55 -0400 Subject: [PATCH 6/9] Removed unused dependencies --- Cargo.lock | 18 ------------------ Cargo.toml | 2 -- 2 files changed, 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9652919..2477958 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -134,9 +134,7 @@ checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593" name = "catapult" version = "0.3.1" dependencies = [ - "futures", "reqwest", - "serde", "serde_json", "swoosh", "textsender_models", @@ -529,21 +527,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" -[[package]] -name = "futures" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - [[package]] name = "futures-channel" version = "0.3.32" @@ -617,7 +600,6 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ - "futures-channel", "futures-core", "futures-io", "futures-macro", diff --git a/Cargo.toml b/Cargo.toml index 01f4768..7c7776f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,9 +6,7 @@ edition = "2024" [dependencies] tokio = { version = "1.52.3", features = ["full"] } -futures = { version = "0.3.32" } reqwest = { version = "0.13.4", features = ["json", "stream", "multipart"] } -serde = { version = "1.0.228", features = ["derive"] } serde_json = { version = "1.0.150" } time = { version = "0.3.53", features = ["formatting", "macros", "parsing", "serde"] } uuid = { version = "1.23.3", features = ["v4", "serde"] } -- 2.47.3 From 5946ec13ed5922f87b20c41f0ea07eb16227cf19 Mon Sep 17 00:00:00 2001 From: phoenix Date: Mon, 6 Jul 2026 22:43:18 -0400 Subject: [PATCH 7/9] cargo update --- Cargo.lock | 57 ++++++++++++------------------------------------------ 1 file changed, 12 insertions(+), 45 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2477958..5dd40e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -145,9 +145,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.65" +version = "1.2.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e228eec9be7c17ccb640b59b36a5cd805ea2a564a4c5e162c2f659fea30d3b96" +checksum = "f5d6cac793997bd970000024b2934968efe83b382de4fdcf4fcb46b6ee4ad996" dependencies = [ "find-msvc-tools", "jobserver", @@ -303,18 +303,18 @@ dependencies = [ [[package]] name = "crossbeam-queue" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +checksum = "803d13fb3b09d88be9f4dbc29062c66b19bf7170867ceb746d2a8689bf6c7a26" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.21" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" [[package]] name = "crypto-common" @@ -633,18 +633,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "getrandom" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" -dependencies = [ - "cfg-if", - "libc", - "r-efi 5.3.0", - "wasip2", -] - [[package]] name = "getrandom" version = "0.4.3" @@ -654,7 +642,7 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "r-efi 6.0.0", + "r-efi", "rand_core", "wasm-bindgen", ] @@ -1021,11 +1009,11 @@ dependencies = [ [[package]] name = "jobserver" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" dependencies = [ - "getrandom 0.3.4", + "getrandom 0.4.3", "libc", ] @@ -1392,12 +1380,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "r-efi" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" - [[package]] name = "r-efi" version = "6.0.0" @@ -1633,9 +1615,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "ryu" @@ -2516,15 +2498,6 @@ version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" -[[package]] -name = "wasip2" -version = "1.0.4+wasi-0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" -dependencies = [ - "wit-bindgen", -] - [[package]] name = "wasm-bindgen" version = "0.2.126" @@ -2754,12 +2727,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "wit-bindgen" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" - [[package]] name = "writeable" version = "0.6.3" -- 2.47.3 From a39188508af27eb6f4ffac77193b44238819b059 Mon Sep 17 00:00:00 2001 From: phoenix Date: Mon, 6 Jul 2026 22:43:59 -0400 Subject: [PATCH 8/9] bump: catapult --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5dd40e2..e051622 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -132,7 +132,7 @@ checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593" [[package]] name = "catapult" -version = "0.3.1" +version = "0.3.2" dependencies = [ "reqwest", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index 7c7776f..1f2b134 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "catapult" -version = "0.3.1" +version = "0.3.2" rust-version = "1.96.1" edition = "2024" -- 2.47.3 From b017ed71438a3ba7bf19a2062a2b3d1153b707d0 Mon Sep 17 00:00:00 2001 From: phoenix Date: Mon, 6 Jul 2026 22:50:43 -0400 Subject: [PATCH 9/9] Code refactoring --- src/app.rs | 2 -- src/service/core.rs | 28 +--------------------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/src/app.rs b/src/app.rs index fdfe8a7..7d840e7 100644 --- a/src/app.rs +++ b/src/app.rs @@ -12,8 +12,6 @@ pub struct App { pub twilio_config: textsender_models::config::auxiliary::TwilioConfig, } -// TODO: Change this to non-async at some point. -// Will require changes in other libraries pub fn load_app() -> Result { use textsender_models::envy; let auth_url_env = envy::environment::get_env("AUTH_URL"); diff --git a/src/service/core.rs b/src/service/core.rs index 969f22d..195bf88 100644 --- a/src/service/core.rs +++ b/src/service/core.rs @@ -5,7 +5,6 @@ pub struct Service { impl Service { pub async fn do_the_work(&mut self) { - println!("Do some work"); println!("Checking queue"); use textsender_models::message::scheduling::ScheduledMessage; @@ -148,39 +147,14 @@ impl Service { } } } - - /* - todo!( - r#" - Need to finish this - - [X] - This function should fetch a token, check if the token is valid, and obtain a refresh token if - it has expired. - - Then do the real work. - - 1. Check the queue - Done - 2. If there is an item, get the data - Done - 3. Evaluate if it is schedulable - Done - 4. Get the events and iterate each one - Done - 5. Starting with the message - Done - 6. Get the contact - Done - 7. Send the message - 8. Record the message event response - Added, not used - 9. Add to scheduler - "# - ); - */ } fn is_schedulable( &self, queue_item: &textsender_models::message::scheduling::ScheduledMessage, ) -> bool { - let now = time::OffsetDateTime::now_utc(); - match queue_item.scheduled { - Some(date) => date > now, + Some(date) => date > time::OffsetDateTime::now_utc(), None => false, } } -- 2.47.3