Enable CI
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Andrey Tkachenko 2022-03-09 12:37:17 +04:00
parent 73aeefb46f
commit 1d898b8257
3 changed files with 20 additions and 17 deletions

14
.drone.yml Normal file
View File

@ -0,0 +1,14 @@
kind: pipeline
name: default
steps:
- name: build
image: rust
commands:
- cargo build --verbose --all
- name: fmt-check
image: rust
commands:
- rustup component add rustfmt
- cargo fmt --all -- --check

View File

@ -247,7 +247,8 @@ where
Event::Synchronized(_res) => self.context.synchronized.notify_waiters(), Event::Synchronized(_res) => self.context.synchronized.notify_waiters(),
Event::Response(mid, resp) => { Event::Response(mid, resp) => {
let prev_value = self.context.processing.fetch_sub(1, Ordering::SeqCst); let prev_value = self.context.processing.fetch_sub(1, Ordering::SeqCst);
if prev_value == 1 { // last task completes if prev_value == 1 {
// last task completes
self.context.idle.notify_waiters(); self.context.idle.notify_waiters();
} }

View File

@ -75,14 +75,8 @@ macro_rules! buffer_unordered_batch_poller_macro {
let buffer_clone = buffer.drain(..).collect(); let buffer_clone = buffer.drain(..).collect();
#[allow(clippy::redundant_closure_call)] #[allow(clippy::redundant_closure_call)]
let _ = ($st1)( let _ =
buffer_mid_clone, ($st1)(buffer_mid_clone, buffer_clone, bus, ut, task_permit, stx);
buffer_clone,
bus,
ut,
task_permit,
stx,
);
} }
} }
Request::Action(Action::Init(..)) => { Request::Action(Action::Init(..)) => {
@ -100,14 +94,8 @@ macro_rules! buffer_unordered_batch_poller_macro {
let task_permit = semaphore.clone().acquire_owned().await; let task_permit = semaphore.clone().acquire_owned().await;
#[allow(clippy::redundant_closure_call)] #[allow(clippy::redundant_closure_call)]
let _ = ($st1)( let _ =
buffer_mid_clone, ($st1)(buffer_mid_clone, buffer_clone, bus, ut, task_permit, stx);
buffer_clone,
bus,
ut,
task_permit,
stx,
);
} }
let _ = semaphore.acquire_many(cfg.max_parallel as _).await; let _ = semaphore.acquire_many(cfg.max_parallel as _).await;