test: characterize contracts and make startup explicit
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from flask import Flask, render_template_string, request, redirect, url_for, flash
|
||||
import os
|
||||
|
||||
from controller_core import enqueue_download
|
||||
from controller_core import enqueue_download, start_controller, stop_controller
|
||||
|
||||
app = Flask(__name__)
|
||||
app.secret_key = os.environ.get("FLASK_SECRET_KEY", "dev-secret")
|
||||
@@ -250,4 +250,8 @@ def submit():
|
||||
return redirect(url_for("index"))
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host="0.0.0.0", port=int(os.environ.get("PORT", 7531)))
|
||||
start_controller()
|
||||
try:
|
||||
app.run(host="0.0.0.0", port=int(os.environ.get("PORT", 7531)))
|
||||
finally:
|
||||
stop_controller()
|
||||
|
||||
Reference in New Issue
Block a user