pup-py commited on
Commit
be73e9c
·
1 Parent(s): 2c8258c

self ping correct host 2

Browse files
Files changed (1) hide show
  1. fetch.py +3 -3
fetch.py CHANGED
@@ -131,13 +131,13 @@ async def ping():
131
 
132
 
133
  def self_ping():
134
- self_host = getenv("SPACE_HOST", "http://0.0.0.0:7860")
135
  with httpx.Client() as client:
136
- _ = client.get(f"{self_host}/ping")
137
 
138
 
139
  scheduler = AsyncIOScheduler(executors={"default": AsyncIOExecutor()})
140
- scheduler.add_job(self_ping, "interval", minutes=1)
141
 
142
 
143
  if __name__ == "__main__":
 
131
 
132
 
133
  def self_ping():
134
+ self_host = getenv("SPACE_HOST", "0.0.0.0:7860")
135
  with httpx.Client() as client:
136
+ _ = client.get(f"http://{self_host}/ping")
137
 
138
 
139
  scheduler = AsyncIOScheduler(executors={"default": AsyncIOExecutor()})
140
+ scheduler.add_job(self_ping, "interval", minutes=10)
141
 
142
 
143
  if __name__ == "__main__":