mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-23 21:20:42 +08:00
translated
This commit is contained in:
parent
2ae231ba25
commit
7c458f5b70
@ -67,10 +67,10 @@ app = config.make_wsgi_app()
|
||||
import time
|
||||
from prometheus_client import push_to_gateway
|
||||
def push_temperature(url):
|
||||
while True:
|
||||
registry = prometheus_temperature(get_temperature())
|
||||
push_to_gateway(url, "temperature collector", registry)
|
||||
time.sleep(60*60)
|
||||
while True:
|
||||
registry = prometheus_temperature(get_temperature())
|
||||
push_to_gateway(url, "temperature collector", registry)
|
||||
time.sleep(60*60)
|
||||
```
|
||||
|
||||
URL 是推送网关的 URL。它通常以 **:9091** 结尾。
|
||||
|
Loading…
Reference in New Issue
Block a user