When starting Flask, I get the handler started
message twice, even before any request is made. What is the redundant process and how to fix this?
* Serving Flask app "app.py" (lazy loading)
* Environment: development
* Debug mode: on
* Restarting with windowsapi reloader
------------>>> handler started
* Debugger is active!
* Debugger PIN: 519-729-899
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
------------>>> handler started
app.py
:
from flask import Flask
from flask import request
from frontend.handler import handler
app = Flask(__name__)
app.register_blueprint(handler)
@app.route('/flask_alive')
def requestAlive():
return 'Flast is alive'
handler.py
:
from flask import Blueprint, request, jsonify, abort
import pprint
import datetime
handler = Blueprint('handler', __name__)
pp = pprint.PrettyPrinter(indent=4)
print('------------>>> handler started')
@handler.route('/visualcode/py/<url>', methods=['POST'])
@check_auth
def process(url):
...................