Exemplo n.º 1
0
 def refresh(self):
     # Hide/Unhide rsync menu item based on whether the plugin is online
     if self._syncNowItem and \
        self.smfInst.get_service_state() == "online":
         #self._setup_file_monitor()
         self._setup_monitor()
         # Kick start things by initially obtaining the
         # backlog size and triggering a callback.
         # Signal handlers will keep tooltip status up
         # to date afterwards when the backup cron job
         # executes.
         propName = "%s:rsync" % (backup.propbasename)
         queue = backup.list_pending_snapshots(propName)
         self.queueSize = len(queue)
         if self.queueSize == 0:
             self._rsync_synced_handler()
         else:
             self._rsync_unsynced_handler(self.queueSize)
         self._syncNowItem.show()
     else:
         self._syncNowItem.hide()
Exemplo n.º 2
0
 def refresh(self):
     # Hide/Unhide rsync menu item based on whether the plugin is online
     if self._syncNowItem and \
        self.smfInst.get_service_state() == "online":
         #self._setup_file_monitor()
         self._setup_monitor()
         # Kick start things by initially obtaining the
         # backlog size and triggering a callback.
         # Signal handlers will keep tooltip status up
         # to date afterwards when the backup cron job
         # executes.
         propName = "%s:rsync" % (backup.propbasename)
         queue = backup.list_pending_snapshots(propName)
         self.queueSize = len(queue)
         if self.queueSize == 0:
             self._rsync_synced_handler()
         else:
             self._rsync_unsynced_handler(self.queueSize)
         self._syncNowItem.show()
     else:
         self._syncNowItem.hide()