parent
6f6827d4d9
commit
0e41f57ce5
2 changed files with 8 additions and 3 deletions
|
|
@ -67,8 +67,10 @@ impl PushSender {
|
|||
VapidSignatureBuilder::from_pem_no_sub(std::io::Cursor::new(&self.private_key))
|
||||
.map_err(|e| crate::error::AppError::Internal(e.to_string()))?;
|
||||
|
||||
let mut builder = builder.add_sub_info(&subscription_info);
|
||||
builder.add_claim("sub", "mailto:pavel@flegr.me");
|
||||
|
||||
let vapid_signature = builder
|
||||
.add_sub_info(&subscription_info)
|
||||
.build()
|
||||
.map_err(|e| crate::error::AppError::Internal(e.to_string()))?;
|
||||
|
||||
|
|
|
|||
|
|
@ -170,9 +170,12 @@ pub async fn execute_agent_run(
|
|||
};
|
||||
|
||||
tokio::spawn(async move {
|
||||
let _ = sender
|
||||
if let Err(e) = sender
|
||||
.send_notification(&sub_data, &format!("Task Completed: {}", status), &goal)
|
||||
.await;
|
||||
.await
|
||||
{
|
||||
tracing::error!("Failed to send notification in background task: {}", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue