Compare commits

...

2 Commits
0.4.3 ... 0.4.4

Author SHA1 Message Date
Mark Qvist
407cc8fb5f Updated version 2024-01-08 00:12:38 +01:00
Mark Qvist
1f7302903a Fixed missing timestamp update on page/file periodic scan 2024-01-08 00:10:55 +01:00
4 changed files with 26 additions and 4 deletions

View File

@@ -50,6 +50,8 @@ class Node:
def register_pages(self):
# TODO: Deregister previously registered pages
# that no longer exist.
self.servedpages = []
self.scan_pages(self.app.pagespath)
@@ -69,6 +71,8 @@ class Node:
)
def register_files(self):
# TODO: Deregister previously registered files
# that no longer exist.
self.servedfiles = []
self.scan_files(self.app.filespath)
@@ -230,10 +234,12 @@ class Node:
if self.page_refresh_interval > 0:
if now > self.last_page_refresh + self.page_refresh_interval*60:
self.register_pages()
self.last_page_refresh = time.time()
if self.file_refresh_interval > 0:
if now > self.last_file_refresh + self.file_refresh_interval*60:
self.register_files()
self.last_file_refresh = time.time()
time.sleep(self.job_interval)

View File

@@ -1077,6 +1077,22 @@ announce_at_start = Yes
# and generally you do not need to use it.
# prioritise_destinations = 41d20c727598a3fbbdf9106133a3a0ed, d924b81822ca24e68e2effea99bcb8cf
# Automatic rescan interval of the pages directory in minutes.
# Default: int = 0 (no rescan)
page_refresh_interval = 0
# You can specify the interval in minutes for
# rescanning the hosted pages path. By default,
# this option is disabled, and the pages path
# will only be scanned on startup.
# page_refresh_interval = 0
# You can specify the interval in minutes for
# rescanning the hosted files path. By default,
# this option is disabled, and the files path
# will only be scanned on startup.
# file_refresh_interval = 0
[printing]
# You can configure Nomad Network to print

View File

@@ -1 +1 @@
__version__ = "0.4.3"
__version__ = "0.4.4"

View File

@@ -624,7 +624,7 @@ Determines where the node server will look for hosted pages. Must be a readable
>>>
`!page_refresh_interval = 0`!
>>>>
Determines the interval in seconds for rescanning the hosted pages path. By default, this option is disabled, and the pages path will only be scanned on startup.
Determines the interval in minutes for rescanning the hosted pages path. By default, this option is disabled, and the pages path will only be scanned on startup.
<
>>>
@@ -636,7 +636,7 @@ Determines where the node server will look for downloadable files. Must be a rea
>>>
`!file_refresh_interval = 0`!
>>>>
Determines the interval in seconds for rescanning the hosted files path. By default, this option is disabled, and the files path will only be scanned on startup.
Determines the interval in minutes for rescanning the hosted files path. By default, this option is disabled, and the files path will only be scanned on startup.
<
>>>