change env url

This commit is contained in:
yasirarism 2023-07-02 12:40:45 +07:00 committed by GitHub
parent 458a81aa34
commit e335d36c5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,19 +9,19 @@ from git import Repo
LOGGER = logging.getLogger(__name__)
CONFIG_FILE_URL = os.environ.get("CONFIG_FILE_URL")
ENV_URL = os.environ.get("ENV_URL")
try:
if len(CONFIG_FILE_URL) == 0:
if len(ENV_URL) == 0:
raise TypeError
try:
res = requests.get(CONFIG_FILE_URL)
res = requests.get(ENV_URL)
if res.status_code == 200:
with open("config.env", "wb+") as f:
f.write(res.content)
else:
LOGGER.error(f"config.env err: {res.status_code}")
except Exception as e:
LOGGER.error(f"CONFIG_FILE_URL: {e}")
LOGGER.error(f"ENV_URL: {e}")
except:
pass