1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

Switch to event-listener for in-process job notifications

This commit is contained in:
Quentin Gliech
2023-07-18 10:06:43 +02:00
parent f6d4bfdb76
commit ab00002acd
5 changed files with 28 additions and 27 deletions

View File

@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use std::time::Duration;
use anyhow::Context;
use apalis_core::{
builder::{WorkerBuilder, WorkerFactoryFn},
@@ -167,7 +169,7 @@ pub(crate) fn register(
.layer(state.inject())
.layer(trace_layer())
.layer(metrics_layer())
.with_storage(storage)
.with_storage_config(storage, |c| c.fetch_interval(Duration::from_secs(1)))
.build_fn(provision_user);
let storage = storage_factory.build();
@@ -176,7 +178,7 @@ pub(crate) fn register(
.layer(state.inject())
.layer(trace_layer())
.layer(metrics_layer())
.with_storage(storage)
.with_storage_config(storage, |c| c.fetch_interval(Duration::from_secs(1)))
.build_fn(provision_device);
let storage = storage_factory.build();
@@ -185,7 +187,7 @@ pub(crate) fn register(
.layer(state.inject())
.layer(trace_layer())
.layer(metrics_layer())
.with_storage(storage)
.with_storage_config(storage, |c| c.fetch_interval(Duration::from_secs(1)))
.build_fn(delete_device);
monitor