You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
673 B
23 lines
673 B
import os
|
|
from flask import Flask
|
|
import flask_apscheduler
|
|
# from flask_sqlalchemy import SQLAlchemy
|
|
# db = SQLAlchemy()
|
|
# migrate = Migrate()
|
|
|
|
|
|
def create_app():
|
|
APP = Flask(__name__)
|
|
scheduler = flask_apscheduler.APScheduler()
|
|
scheduler.api_enabled = False
|
|
scheduler.init_app(APP)
|
|
scheduler.start()
|
|
# APP.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///data/crunk_data.db"
|
|
# APP.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = True
|
|
# db.init_app(APP)
|
|
# migrate.init_app(APP, db, render_as_batch=True)
|
|
@scheduler.task("interval", id="update", minutes=10)
|
|
def update():
|
|
print("Updating the RSS feeds!")
|
|
|
|
return APP
|
|
|