Mihaiii commited on
Commit
7c51cec
·
verified ·
1 Parent(s): 3b8514e

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import asyncio
2
+ from concurrent.futures import ThreadPoolExecutor
3
+ from cron_processor import main
4
+
5
+ def start_worker():
6
+ load_dotenv()
7
+ logging.basicConfig(
8
+ format='%(asctime)s - %(levelname)s - %(message)s',
9
+ level=logging.INFO,
10
+ datefmt='%Y-%m-%d %H:%M:%S'
11
+ )
12
+ asyncio.run(main())
13
+
14
+ executor = ThreadPoolExecutor(max_workers=1)
15
+ executor.submit(start_worker)