Remove actix actor dependency

This commit is contained in:
asonix
2020-04-23 13:28:00 -05:00
parent a51bed3cc4
commit d3e3a13997
6 changed files with 28 additions and 80 deletions
+2 -2
View File
@@ -283,10 +283,10 @@ impl ActorCache {
}
fn spawn_rehydrate(&self) {
use actix::clock::{interval_at, Instant};
use actix_rt::time::{interval_at, Instant};
let this = self.clone();
actix::spawn(async move {
actix_rt::spawn(async move {
let mut interval = interval_at(Instant::now(), Duration::from_secs(60 * 10));
loop {
+6 -3
View File
@@ -6,14 +6,17 @@ use crate::{
requests::Requests,
};
use activitystreams::primitives::XsdAnyUri;
use actix::clock::{interval_at, Duration, Instant};
use actix_rt::{
spawn,
time::{interval_at, Instant},
};
use actix_web::web;
use futures::{join, try_join};
use log::{error, info};
use lru::LruCache;
use rand::thread_rng;
use rsa::{RSAPrivateKey, RSAPublicKey};
use std::{collections::HashSet, sync::Arc};
use std::{collections::HashSet, sync::Arc, time::Duration};
use tokio::sync::RwLock;
#[derive(Clone)]
@@ -194,7 +197,7 @@ impl State {
fn spawn_rehydrate(&self, db: Db) {
let state = self.clone();
actix::spawn(async move {
spawn(async move {
let start = Instant::now();
let duration = Duration::from_secs(60 * 10);