This repository has been archived by the owner on Jan 18, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(GetData): resolve mutiples error of async in GetData
- Loading branch information
Showing
3 changed files
with
28 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
import asyncio | ||
from logging import Logger, getLogger | ||
|
||
from check_phat_nguoi.config import config | ||
from check_phat_nguoi.config.config_reader import _config_reader | ||
from check_phat_nguoi.get_data.check_phat_nguoi import GetDataCheckPhatNguoi | ||
|
||
from .utils.setup_logger import setup_logger | ||
|
||
logger: Logger = getLogger(__name__) | ||
|
||
|
||
def main() -> None: | ||
async def _main(): | ||
setup_logger() | ||
logger.debug(config) | ||
get_data_object = GetDataCheckPhatNguoi(_config_reader().data) | ||
data = await get_data_object.get_data() | ||
|
||
|
||
def main(): | ||
asyncio.run(_main()) | ||
|
||
|
||
__all__ = ["main"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters