parent
01934e231f
commit
3e4bf7ddb7
3 changed files with 4 additions and 4 deletions
|
@ -12,7 +12,7 @@ pub const RETRIES_NUMBER: i32 = 20;
|
||||||
|
|
||||||
impl From<AsyncQueueError> for FangError {
|
impl From<AsyncQueueError> for FangError {
|
||||||
fn from(error: AsyncQueueError) -> Self {
|
fn from(error: AsyncQueueError) -> Self {
|
||||||
let message = format!("{:?}", error);
|
let message = format!("{error:?}");
|
||||||
FangError {
|
FangError {
|
||||||
description: message,
|
description: message,
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,14 +6,14 @@ use std::io::Error as IoError;
|
||||||
|
|
||||||
impl From<IoError> for FangError {
|
impl From<IoError> for FangError {
|
||||||
fn from(error: IoError) -> Self {
|
fn from(error: IoError) -> Self {
|
||||||
let description = format!("{:?}", error);
|
let description = format!("{error:?}");
|
||||||
FangError { description }
|
FangError { description }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<QueueError> for FangError {
|
impl From<QueueError> for FangError {
|
||||||
fn from(error: QueueError) -> Self {
|
fn from(error: QueueError) -> Self {
|
||||||
let description = format!("{:?}", error);
|
let description = format!("{error:?}");
|
||||||
FangError { description }
|
FangError { description }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ where
|
||||||
/// This is necessary in order to execute tasks.
|
/// This is necessary in order to execute tasks.
|
||||||
pub fn start(&mut self) -> Result<(), FangError> {
|
pub fn start(&mut self) -> Result<(), FangError> {
|
||||||
for idx in 1..self.number_of_workers + 1 {
|
for idx in 1..self.number_of_workers + 1 {
|
||||||
let name = format!("worker_{}{}", self.task_type, idx);
|
let name = format!("worker_{}{idx}", self.task_type);
|
||||||
|
|
||||||
let worker_thread = WorkerThread::builder()
|
let worker_thread = WorkerThread::builder()
|
||||||
.name(name.clone())
|
.name(name.clone())
|
||||||
|
|
Loading…
Reference in a new issue