mirror of
https://github.com/simon987/Architeuthis.git
synced 2025-12-14 17:39:03 +00:00
retry on fail, retry on http status codes
This commit is contained in:
24
test/web.py
Normal file
24
test/web.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from flask import Flask, Response
|
||||
import time
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
|
||||
@app.route("/")
|
||||
def hello():
|
||||
time.sleep(90)
|
||||
return "Hello World!"
|
||||
|
||||
|
||||
@app.route("/500")
|
||||
def e500():
|
||||
return Response(status=500)
|
||||
|
||||
|
||||
@app.route("/404")
|
||||
def e404():
|
||||
return Response(status=404)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(port=9999)
|
||||
Reference in New Issue
Block a user