mirror of
https://github.com/thingsboard/thingsboard-gateway
synced 2025-10-26 22:31:42 +08:00
Added check for rescanning files in the path
This commit is contained in:
@@ -134,7 +134,10 @@ class FTPConnector(Connector, Thread):
|
||||
configuration = path.config
|
||||
converter = FTPUplinkConverter(configuration)
|
||||
path.last_polled_time = time_point
|
||||
# TODO: check if to rescan path
|
||||
|
||||
if '*' in path.path:
|
||||
path.find_files(ftp)
|
||||
|
||||
for file in path.files:
|
||||
current_hash = file.get_current_hash(ftp)
|
||||
if ((file.has_hash() and current_hash != file.hash) or not file.has_hash()) and file.check_size_limit(
|
||||
|
||||
@@ -168,6 +168,10 @@ class Path:
|
||||
def last_polled_time(self):
|
||||
return self._last_polled_time
|
||||
|
||||
@property
|
||||
def path(self):
|
||||
return self._path
|
||||
|
||||
@property
|
||||
def poll_period(self):
|
||||
return self._poll_period
|
||||
|
||||
Reference in New Issue
Block a user