Use HashMap::from in scheduler module
This commit is contained in:
parent
533cd81aa6
commit
d3bad8d38d
1 changed files with 7 additions and 6 deletions
|
@ -127,12 +127,13 @@ pub fn run(
|
||||||
db_pool: DbPool,
|
db_pool: DbPool,
|
||||||
) -> () {
|
) -> () {
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
let mut scheduler_state = HashMap::new();
|
let mut scheduler_state = HashMap::from([
|
||||||
scheduler_state.insert(Task::NftMonitor, None);
|
(Task::NftMonitor, None),
|
||||||
scheduler_state.insert(Task::EthereumSubscriptionMonitor, None);
|
(Task::EthereumSubscriptionMonitor, None),
|
||||||
scheduler_state.insert(Task::SubscriptionExpirationMonitor, None);
|
(Task::SubscriptionExpirationMonitor, None),
|
||||||
scheduler_state.insert(Task::MoneroPaymentMonitor, None);
|
(Task::MoneroPaymentMonitor, None),
|
||||||
scheduler_state.insert(Task::IncomingActivityQueue, None);
|
(Task::IncomingActivityQueue, None),
|
||||||
|
]);
|
||||||
|
|
||||||
let mut interval = tokio::time::interval(Duration::from_secs(5));
|
let mut interval = tokio::time::interval(Duration::from_secs(5));
|
||||||
let mut token_waitlist_map: HashMap<Uuid, DateTime<Utc>> = HashMap::new();
|
let mut token_waitlist_map: HashMap<Uuid, DateTime<Utc>> = HashMap::new();
|
||||||
|
|
Loading…
Reference in a new issue