Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,17 @@ async fn main() -> Result<(), Error> {
let client = reqwest::Client::new();

loop {
let response = client
let content = client
.get(&request_url)
.bearer_auth(&wp_token)
.send()
.await?
.bytes()
.await?;

let wp_queue_info: WpQueueInfo = response.json().await?;
let Ok(wp_queue_info) = serde_json::from_slice::<WpQueueInfo>(&content) else {
error!("Cannot decode JSON from {request_url}: {content:?}");
process::exit(1);
};

strategy.apply(&wp_queue_info).await;

Expand Down