Adding limit to the number of stored files.
This commit is contained in:
parent
7a56366cbf
commit
89bc51b1f9
|
|
@ -162,6 +162,7 @@ defaultConfig = PropertyLayer(
|
|||
callsign_url="https://www.qrzcq.com/call/{}",
|
||||
usage_policy_url="policy",
|
||||
session_timeout=0,
|
||||
keep_files=20,
|
||||
decoding_queue_workers=2,
|
||||
decoding_queue_length=10,
|
||||
wsjt_decoding_depth=3,
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class FilesController(WebpageController):
|
|||
for f in files[keepN:]:
|
||||
try:
|
||||
os.unlink(dir + "/" + f)
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def template_variables(self):
|
||||
|
|
|
|||
|
|
@ -70,18 +70,24 @@ class GeneralSettingsController(SettingsFormController):
|
|||
NumberInput(
|
||||
"max_clients",
|
||||
"Maximum number of clients",
|
||||
infotext="Number of people who can connect at the same time.",
|
||||
),
|
||||
NumberInput(
|
||||
"keep_files",
|
||||
"Maximum number of files",
|
||||
infotext="Number of received images and other files to keep.",
|
||||
),
|
||||
NumberInput(
|
||||
"session_timeout",
|
||||
"Session timeout",
|
||||
infotext="User session timeout in seconds (0 to disable timeout).",
|
||||
infotext="Client session timeout in seconds (0 to disable timeout).",
|
||||
append="secs",
|
||||
),
|
||||
TextInput(
|
||||
"usage_policy_url",
|
||||
"Usage policy URL",
|
||||
infotext="Specifies web page describing receiver usage policy "
|
||||
+ "and shown when the user session times out.",
|
||||
+ "and shown when a client session times out.",
|
||||
),
|
||||
),
|
||||
Section(
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ class ReceiverDetails(PropertyFilter):
|
|||
"photo_desc",
|
||||
"usage_policy_url",
|
||||
"session_timeout",
|
||||
"keep_files",
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue