Spaces:
Sleeping
Sleeping
import asyncio | |
from concurrent.futures import ThreadPoolExecutor | |
from cron_processor import main | |
def start_worker(): | |
load_dotenv() | |
logging.basicConfig( | |
format='%(asctime)s - %(levelname)s - %(message)s', | |
level=logging.INFO, | |
datefmt='%Y-%m-%d %H:%M:%S' | |
) | |
asyncio.run(main()) | |
executor = ThreadPoolExecutor(max_workers=1) | |
executor.submit(start_worker) | |