This commit is contained in:
Piero Toffanin 2023-03-09 23:13:05 -05:00
parent f8084c0ae1
commit 3f7489836f

View file

@ -1,12 +1,8 @@
import atexit
import random
import string
from multiprocessing.dummy import Value
from libretranslate.storage import get_storage
from apscheduler.schedulers.background import BackgroundScheduler
setup_secrets = Value('b', False)
def generate_secret():
return ''.join(random.choices(string.ascii_uppercase + string.digits, k=7))
@ -16,8 +12,6 @@ def rotate_secrets():
secret_1 = s.get_str("secret_1")
s.set_str("secret_0", secret_1)
s.set_str("secret_1", generate_secret())
print(s.get_str("secret_0"))
print(s.get_str("secret_1"))
def secret_match(secret):