2023-07-27 17:30:29 +00:00
|
|
|
"""wait for hooks"""
|
|
|
|
|
2023-07-29 16:52:53 +00:00
|
|
|
from os import environ
|
|
|
|
|
2023-07-27 17:30:29 +00:00
|
|
|
from flask import Flask
|
|
|
|
from main import main as run_refresh
|
|
|
|
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
|
|
|
|
|
|
|
@app.route("/", methods=["POST"])
|
|
|
|
def home():
|
|
|
|
"""handle post grequest"""
|
|
|
|
run_refresh()
|
|
|
|
|
|
|
|
return "success"
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2023-07-29 16:52:53 +00:00
|
|
|
PORT = int(environ.get("LISTEN_PORT", 8001))
|
2023-07-27 17:30:29 +00:00
|
|
|
app.run(host="0.0.0.0", port=PORT)
|