mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-07-09 03:04:26 -04:00
Merge pull request #810 from DL6ER/tweak/lt_port
Support LT_PORT in healtcheck script
This commit is contained in:
commit
e469dbb3c7
@ -1,7 +1,9 @@
|
|||||||
import requests
|
import requests
|
||||||
|
import os
|
||||||
|
|
||||||
|
port = os.environ.get('LT_PORT', '5000')
|
||||||
response = requests.post(
|
response = requests.post(
|
||||||
url='http://localhost:5000/translate',
|
url=f'http://localhost:{port}/translate',
|
||||||
headers={'Content-Type': 'application/json'},
|
headers={'Content-Type': 'application/json'},
|
||||||
json={
|
json={
|
||||||
'q': 'Hello World!',
|
'q': 'Hello World!',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user