Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

make sleep async #13

Merged
merged 2 commits into from
Jul 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Using `asyncio.sleep` instead of `time.sleep` within `trigger_sync` task.

### Security

## 0.1.0
Expand Down
4 changes: 2 additions & 2 deletions prefect_airbyte/connections.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Tasks for connecting to Airbyte and triggering connection syncs"""
import uuid
from time import sleep
from asyncio import sleep

from prefect import task
from prefect.logging.loggers import get_logger
Expand Down Expand Up @@ -137,7 +137,7 @@ def example_trigger_sync_flow():
if status_updates:
logger.info(job_status)
# wait for next poll interval
sleep(poll_interval_s)
await sleep(poll_interval_s)

return {
"connection_id": connection_id,
Expand Down