mirror of
https://github.com/Tygs/0bin.git
synced 2023-08-10 21:13:00 +03:00
Tweak command to remove expired pastes
This commit is contained in:
parent
262db62265
commit
b73ce9684f
@ -158,7 +158,9 @@ def set_admin_password(password):
|
||||
settings.ADMIN_PASSWORD_FILE.write_bytes(hash_password(password))
|
||||
|
||||
|
||||
def clean_expired_pastes(*, dry_run=False, verbose=False):
|
||||
def clean_expired_pastes(
|
||||
*, dry_run=False, verbose=False, config_dir="", data_dir="",
|
||||
):
|
||||
""" Clean expired file pastes and empty paste directories
|
||||
|
||||
This features delete files from the data dir, make sure it's safe.
|
||||
@ -166,7 +168,7 @@ def clean_expired_pastes(*, dry_run=False, verbose=False):
|
||||
Use "dry_run" and "verbose" options to check first
|
||||
"""
|
||||
|
||||
ensure_app_context()
|
||||
ensure_app_context(config_dir=config_dir, data_dir=data_dir)
|
||||
|
||||
print("Deleting expired pastes...")
|
||||
i = 0
|
||||
|
Loading…
Reference in New Issue
Block a user