Initial commit
This commit is contained in:
20
pkgs/SynapseRevitalization/get_config.py
Normal file
20
pkgs/SynapseRevitalization/get_config.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import os
|
||||
|
||||
def read_vars():
|
||||
if os.environ.get("SYNAPSE_REVITALIZATION_AUTH_TOKEN_TERM") == None:
|
||||
auth_token_term = 180
|
||||
else:
|
||||
auth_token_term = os.environ["SYNAPSE_REVITALIZATION_AUTH_TOKEN_TERM"]
|
||||
|
||||
admin_auth_token_file = os.environ["SYNAPSE_REVITALIZATION_ADMIN_AUTH_TOKEN_FILE"]
|
||||
|
||||
with open(admin_auth_token_file, "r") as file:
|
||||
admin_auth_token = file.read().split("\n")[0]
|
||||
|
||||
return {
|
||||
"auth_token_term": auth_token_term,
|
||||
"admin_auth_token": admin_auth_token,
|
||||
"server_key_file": os.environ["SYNAPSE_REVITALIZATION_SERVER_KEY_FILE"],
|
||||
"origin_server_name": os.environ["SYNAPSE_REVITALIZATION_SERVER_NAME"],
|
||||
"origin_server": os.environ["SYNAPSE_REVITALIZATION_SERVER_ADDRESS"],
|
||||
}
|
Reference in New Issue
Block a user