Skip to content

Commit 0e86024

Browse files
committed
fix spawn_cleanup_task
1 parent b50791b commit 0e86024

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ jobs:
5757
toolchain: ${{ matrix.rust }}
5858
override: true
5959

60-
- name: check
61-
uses: actions-rs/cargo@v1
62-
with:
63-
command: check
64-
args: --all --bins --examples
65-
6660
- name: check avoid-dev-deps
6761
uses: actions-rs/cargo@v1
6862
if: matrix.rust == 'nightly'

src/mysql.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,14 @@ impl MySqlSessionStore {
199199
/// # Ok(()) }) }
200200
/// ```
201201
#[cfg(feature = "async_std")]
202-
pub fn spawn_cleanup_task(&self, period: std::time::Duration) -> task::JoinHandle<()> {
202+
pub fn spawn_cleanup_task(
203+
&self,
204+
period: std::time::Duration,
205+
) -> async_std::task::JoinHandle<()> {
203206
let store = self.clone();
204-
task::spawn(async move {
207+
async_std::task::spawn(async move {
205208
loop {
206-
task::sleep(period).await;
209+
async_std::task::sleep(period).await;
207210
if let Err(error) = store.cleanup().await {
208211
log::error!("cleanup error: {}", error);
209212
}

0 commit comments

Comments
 (0)