Skip to content

Use async mutex instead of std mutex #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 2, 2021
Merged
Show file tree
Hide file tree
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
9 changes: 5 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ structopt = "0.3.23"
md5 = "0.7.0"
mongodb = { version = "2.0.0-beta", features = ["bson-u2i"] }
bson = "2.0.0-beta"
tokio = "1.14.0"
2 changes: 1 addition & 1 deletion charts/matrixbot-ack/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
description: Matrixbot Ack
name: matrixbot-ack
version: v0.2.5
version: v0.2.6
apiVersion: v2
2 changes: 1 addition & 1 deletion charts/matrixbot-ack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ environment: production

image:
repository: web3f/matrixbot-ack
tag: v0.2.5
tag: v0.2.6
pullPolicy: IfNotPresent

config:
Expand Down
3 changes: 2 additions & 1 deletion src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ use crate::matrix::MatrixClient;
use crate::webhook::Alert;
use crate::{unix_time, AlertId, Result};
use actix::prelude::*;
use std::sync::{Arc, Mutex};
use tokio::sync::Mutex;
use std::sync::Arc;
use std::time::Duration;

const CRON_JOB_INTERVAL: u64 = 5;
Expand Down