mirror of
https://git.asonix.dog/asonix/background-jobs.git
synced 2025-04-30 03:44:46 +00:00
actix: simply start_in_arbiter
This commit is contained in:
parent
1ce008e8c4
commit
1266873f5d
1 changed files with 1 additions and 11 deletions
|
@ -216,17 +216,7 @@ where
|
|||
|
||||
/// Start the workers in the provided arbiter
|
||||
pub fn start_in_arbiter(self, arbiter: &Arbiter, queue_handle: QueueHandle) {
|
||||
for (key, count) in self.queues.into_iter() {
|
||||
for _ in 0..count {
|
||||
let key = key.clone();
|
||||
let processors = self.processors.clone();
|
||||
let server = queue_handle.inner.clone();
|
||||
|
||||
arbiter.spawn_fn(move || {
|
||||
local_worker(key, processors.cached(), server);
|
||||
});
|
||||
}
|
||||
}
|
||||
self.start_in_arbiter_handle(&arbiter.handle(), queue_handle)
|
||||
}
|
||||
|
||||
/// Start the workers in the provided arbiter via it's handle
|
||||
|
|
Loading…
Reference in a new issue