izuemon commited on
Commit
5bded02
·
verified ·
1 Parent(s): 6b89d60

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -18,9 +18,6 @@ def start_watcher():
18
  )
19
  print("watcher.py を起動しました")
20
 
21
- @app.before_first_request
22
- def startup():
23
- start_watcher()
24
 
25
  #----------
26
 
@@ -103,4 +100,6 @@ def corsproxy_post():
103
  return Response(resp.content, resp.status_code, headers=headers)
104
 
105
  if __name__ == "__main__":
 
 
106
  app.run(debug=True, host="0.0.0.0", port=7860)
 
18
  )
19
  print("watcher.py を起動しました")
20
 
 
 
 
21
 
22
  #----------
23
 
 
100
  return Response(resp.content, resp.status_code, headers=headers)
101
 
102
  if __name__ == "__main__":
103
+ if os.environ.get("WERKZEUG_RUN_MAIN") != "true":
104
+ start_watcher()
105
  app.run(debug=True, host="0.0.0.0", port=7860)