Update dependencies #5

Merged
phoenix merged 7 commits from update_dependencies into main 2026-06-07 16:02:46 -04:00
4 changed files with 20 additions and 21 deletions
+7 -2
View File
@@ -3,10 +3,10 @@ name: sender Build
on: on:
push: push:
branches: branches:
- v0.1.x - main
pull_request: pull_request:
branches: branches:
- v0.1.x - main
jobs: jobs:
check: check:
@@ -17,6 +17,7 @@ jobs:
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.95 toolchain: 1.95
- uses: Swatinem/rust-cache@v2
- run: | - run: |
mkdir -p ~/.ssh mkdir -p ~/.ssh
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/deploy_key echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/deploy_key
@@ -35,6 +36,7 @@ jobs:
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.95 toolchain: 1.95
- uses: Swatinem/rust-cache@v2
env: env:
AUTH_SID: 'n9c43yr3f2c4743f7y4329dnq238f7' AUTH_SID: 'n9c43yr3f2c4743f7y4329dnq238f7'
AUTH_TOKEN: '9nmc4820qf4cor838r4fy3o84rfy348fyr' AUTH_TOKEN: '9nmc4820qf4cor838r4fy3o84rfy348fyr'
@@ -60,6 +62,7 @@ jobs:
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.95 toolchain: 1.95
- uses: Swatinem/rust-cache@v2
- run: rustup component add rustfmt - run: rustup component add rustfmt
- run: | - run: |
mkdir -p ~/.ssh mkdir -p ~/.ssh
@@ -79,6 +82,7 @@ jobs:
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.95 toolchain: 1.95
- uses: Swatinem/rust-cache@v2
- run: rustup component add clippy - run: rustup component add clippy
- run: | - run: |
mkdir -p ~/.ssh mkdir -p ~/.ssh
@@ -98,6 +102,7 @@ jobs:
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.95 toolchain: 1.95
- uses: Swatinem/rust-cache@v2
- run: | - run: |
mkdir -p ~/.ssh mkdir -p ~/.ssh
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/deploy_key echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/deploy_key
Generated
+7 -8
View File
@@ -178,9 +178,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]] [[package]]
name = "base64-ng" name = "base64-ng"
version = "1.0.6" version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8452b0c98385f31f08318109d6e06a859f89e0c5e38aad6103f095443b063052" checksum = "8992e20e420add1e6e31c6c548a4ba698ed9339bb0863b37478427179c56f05d"
[[package]] [[package]]
name = "bitflags" name = "bitflags"
@@ -1699,7 +1699,7 @@ checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
[[package]] [[package]]
name = "sender" name = "sender"
version = "0.1.0" version = "0.1.1"
dependencies = [ dependencies = [
"async-std", "async-std",
"futures", "futures",
@@ -1839,8 +1839,8 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]] [[package]]
name = "swoosh" name = "swoosh"
version = "0.3.1" version = "0.3.2"
source = "git+ssh://git@git.kundeng.us/phoenix/swoosh.git?tag=v0.3.1-main-ab01daafea-871#ab01daafeaa9da1209f08ca946893f3dd0a3aad5" source = "git+ssh://git@git.kundeng.us/phoenix/swoosh.git?tag=v0.3.2#122f1183ac0e7b6ea7229d10d3f6d385fbfa047c"
dependencies = [ dependencies = [
"base64-ng", "base64-ng",
"const_format", "const_format",
@@ -1911,13 +1911,12 @@ dependencies = [
[[package]] [[package]]
name = "textsender_models" name = "textsender_models"
version = "0.2.5" version = "0.3.0"
source = "git+ssh://git@git.kundeng.us/phoenix/textsender-models.git?tag=v0.2.5-v0.3.0-migrate-38dbcb09f7-111#38dbcb09f7c2c572f429ec382c01e14b72b1d615" source = "git+ssh://git@git.kundeng.us/phoenix/textsender-models.git?tag=v0.3.0#d504108745b7b97a02eac24e16763cdb5e731f2b"
dependencies = [ dependencies = [
"const_format", "const_format",
"dotenvy", "dotenvy",
"josekit", "josekit",
"rand 0.10.1",
"serde", "serde",
"serde_json", "serde_json",
"time", "time",
+3 -5
View File
@@ -1,17 +1,15 @@
[package] [package]
name = "sender" name = "sender"
version = "0.1.0" version = "0.1.1"
edition = "2024" edition = "2024"
rust-version = "1.95" rust-version = "1.95"
[dependencies] [dependencies]
# uuid = { version = "1.23.1", features = ["v4", "serde"] }
# serde = { version = "1.0.228", features = ["derive"] }
serde_json = { version = "1.0.149" } serde_json = { version = "1.0.149" }
tokio = { version = "1.52.2", features = ["full"] } tokio = { version = "1.52.2", features = ["full"] }
futures = { version = "0.3.32" } futures = { version = "0.3.32" }
textsender_models = { git = "ssh://git@git.kundeng.us/phoenix/textsender-models.git", tag = "v0.2.5-v0.3.0-migrate-38dbcb09f7-111" } textsender_models = { git = "ssh://git@git.kundeng.us/phoenix/textsender-models.git", tag = "v0.3.0" }
swoosh = { git = "ssh://git@git.kundeng.us/phoenix/swoosh.git", tag = "v0.3.1-main-ab01daafea-871" } swoosh = { git = "ssh://git@git.kundeng.us/phoenix/swoosh.git", tag = "v0.3.2" }
[dev-dependencies] [dev-dependencies]
async-std = { version = "1.13.2" } async-std = { version = "1.13.2" }
+3 -6
View File
@@ -4,14 +4,13 @@ use textsender_models::message::Message;
pub async fn send_messages( pub async fn send_messages(
config: &TwilioConfig, config: &TwilioConfig,
contacts: &Vec<Contact>, contacts: &[Contact],
message: &Message, message: &Message,
second_interval: u64, second_interval: u64,
) { ) {
let long_sleep_limit: i64 = 5; let long_sleep_limit: i64 = 5;
let mut count: i64 = 0;
for contact in contacts.iter() { for (text_count, contact) in (0_i64..).zip(contacts.iter()) {
println!("Sending to: {:?}", contact.phone_number); println!("Sending to: {:?}", contact.phone_number);
let param = swoosh::twilio::types::Parameters { let param = swoosh::twilio::types::Parameters {
schedule: false, schedule: false,
@@ -28,7 +27,7 @@ pub async fn send_messages(
} }
} }
if count % long_sleep_limit == 0 { if text_count % long_sleep_limit == 0 {
// Sleep for X seconds // Sleep for X seconds
let wait_time = second_interval; let wait_time = second_interval;
std::thread::sleep(std::time::Duration::from_secs(wait_time)); std::thread::sleep(std::time::Duration::from_secs(wait_time));
@@ -36,8 +35,6 @@ pub async fn send_messages(
// Sleep for a second // Sleep for a second
std::thread::sleep(std::time::Duration::from_secs(1)); std::thread::sleep(std::time::Duration::from_secs(1));
} }
count += 1;
} }
} }