Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-10-15 22:30:49 +02:00
parent dde5e03967
commit c95cabe5ef

View File

@ -167,11 +167,11 @@ class GdriveSync(plugins.Plugin):
self.internet = True self.internet = True
def on_handshake(self, agent): def on_handshake(self, agent):
if not self.ready and not self.internet:
return
if self.lock.locked(): if self.lock.locked():
return return
with self.lock: with self.lock:
if not self.ready and not self.internet:
return
if self.status.newer_then_hours(self.options['interval']): if self.status.newer_then_hours(self.options['interval']):
logging.debug("[update] last check happened less than %d hours ago" % self.options['interval']) logging.debug("[update] last check happened less than %d hours ago" % self.options['interval'])
return return