diff --git a/sitemap-generator/src/app.rs b/sitemap-generator/src/app.rs index 0ec2212..1e3dc4c 100644 --- a/sitemap-generator/src/app.rs +++ b/sitemap-generator/src/app.rs @@ -132,7 +132,7 @@ impl XmlCache { */ pub async fn delete_all(&self, saleor_api_url: &str) -> anyhow::Result<()> { debug!("xml data delete_cache()"); - let mut conn = self.client.get_async_connection().await?; + let mut conn = self.client.get_multiplexed_async_connection().await?; conn.del(self.prepare_key(saleor_api_url)).await?; info!("sucessful cache wipe"); @@ -141,7 +141,7 @@ impl XmlCache { pub async fn get_all(&self, saleor_api_url: &str) -> anyhow::Result> { debug!("xml data get_all()"); - let mut conn = self.client.get_async_connection().await?; + let mut conn = self.client.get_multiplexed_async_connection().await?; let res: Vec = conn.get(self.prepare_key(saleor_api_url)).await?; let cache: Vec = serde_cbor::from_slice(&res)?; @@ -152,7 +152,7 @@ impl XmlCache { pub async fn set(&self, data: Vec, saleor_api_url: &str) -> anyhow::Result<()> { debug!("xml data set()"); - let mut conn = self.client.get_async_connection().await?; + let mut conn = self.client.get_multiplexed_async_connection().await?; conn.set(self.prepare_key(saleor_api_url), serde_cbor::to_vec(&data)?) .await?; info!("sucessful cache set"); diff --git a/sitemap-generator/src/routes/webhooks.rs b/sitemap-generator/src/routes/webhooks.rs index 2fa2946..a0ef478 100644 --- a/sitemap-generator/src/routes/webhooks.rs +++ b/sitemap-generator/src/routes/webhooks.rs @@ -42,6 +42,7 @@ pub async fn webhooks( .to_owned(); let event_type = get_webhook_event_type(&headers)?; if let EitherWebhookType::Async(a) = event_type { + // TODO: Extract this into a function so You can check what the error was if something fails match a { AsyncWebhookEventType::ProductUpdated | AsyncWebhookEventType::ProductCreated