mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-12-18 08:27:03 +02:00
Cleanup
This commit is contained in:
parent
f8084c0ae1
commit
3f7489836f
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user