Spaces:
Sleeping
Sleeping
File size: 695 Bytes
f7095e2 18aeb74 3ff89da 2695e7b f7095e2 0281e9a 11cdb7c f7095e2 0281e9a 11cdb7c f7095e2 0281e9a f7095e2 0281e9a f7095e2 11cdb7c f7095e2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import os
import socket
def defineAmbiente():
print("Estoy en define ambiente...")
if local_check():
print("Entorno Local...")
import bridges
llave = bridges.llave
else:
print("Entorno remoto listo...")
llave = os.getenv("llave")
return llave
def local_check():
hostname = socket.gethostname()
#r-moibe-nowme
print("Hostname: ", hostname)
#Estoy usando el nombre de la app para identificar que estoy corriendola en HF.
if "stripe" in hostname:
print("Ejecutando api en el servidor.")
return False
else:
print("Ejecutando api en local.")
return True |