Commit e62c2400 authored by Jiahang Chen's avatar Jiahang Chen
Browse files

fix applying directory-entry change

parent 0c292f97
Pipeline #438251 passed with stages
in 53 seconds
......@@ -265,25 +265,15 @@ def __json_syn(self, freq=0.1):
except:
continue
def __dir_syn(self, freq=0.1):
"""Applies local changes to the directory entry in the cloud.
def __dir_syn(self):
"""Applies local changes to the directory entry in the cloud only once.
:param freq: Frequency of the update.
:type freq: float
"""
while True:
# try:
time.sleep(freq)
old_dir_json = self.dir_json
self.to_dir_json()
if self.dir_json == old_dir_json:
continue
else:
if self.dir_json is not None:
self.dir.updateThingIDBased(
thingID=self.thing_id, payload=self.dir_json
)
# except:
# continue
def __repo_syn(self, freq=0.1):
"""Applies local changes to the repository entry in the cloud.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment