Muhammad Abdur Rahman Saad commited on
Commit
afdde10
·
1 Parent(s): a7455ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -25,7 +25,7 @@ def create_app():
25
 
26
  # Initialize the APScheduler
27
  scheduler = APScheduler()
28
- scheduler.init_app(app)
29
 
30
  # Schedule a cron job to run main() every day at 16:00
31
  @scheduler.task('cron', id='daily_data_collection', hour=16, minute=0)
@@ -39,7 +39,7 @@ def create_app():
39
  # Start the scheduler
40
  scheduler.start()
41
 
42
- return app
43
 
44
  app = create_app()
45
 
 
25
 
26
  # Initialize the APScheduler
27
  scheduler = APScheduler()
28
+ scheduler.init_app(flask_app)
29
 
30
  # Schedule a cron job to run main() every day at 16:00
31
  @scheduler.task('cron', id='daily_data_collection', hour=16, minute=0)
 
39
  # Start the scheduler
40
  scheduler.start()
41
 
42
+ return flask_app
43
 
44
  app = create_app()
45