mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-04-27 14:20:35 +00:00
Run non-background data persist synchronously
This commit is contained in:
parent
53372fbe4c
commit
294408b0bb
1 changed files with 2 additions and 1 deletions
|
|
@ -999,7 +999,8 @@ class Reticulum:
|
|||
def _should_persist_data(self, background=False):
|
||||
if time.time() > self.last_data_persist+Reticulum.GRACIOUS_PERSIST_INTERVAL:
|
||||
def job(): self.__persist_data(background=background)
|
||||
threading.Thread(target=job, daemon=True).start()
|
||||
if background: threading.Thread(target=job, daemon=True).start()
|
||||
else: job()
|
||||
|
||||
def __persist_data(self, background=False):
|
||||
if Reticulum.gracious_persist_lock.locked(): return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue