1
0
mirror of https://github.com/LibreTranslate/LibreTranslate.git synced 2024-12-18 08:27:03 +02:00
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):