src/client.py
def update(self, force=False):
        """Load apps from cache, update if required"""
        self.all_email_apps = self.wf.cached_data('all_apps', max_age=0)
        self.system_default_app = self.wf.cached_data('system_default_app',
                                                      max_age=0)
        if self.all_email_apps is None:
            self.all_email_apps = []
        if self.system_default_app is None:
            self.system_default_app = {}

        do_update = False
        if force:
            do_update = True
        elif not self.wf.cached_data_fresh('all_apps', MAX_APP_CACHE_AGE):
            do_update = True
        elif not self.wf.cached_data_fresh('system_default_app',
                                           MAX_APP_CACHE_AGE):
            do_update = True
        # Update if required
        if do_update:
            log.debug('Updating application caches ...')
            cmd = ['/usr/bin/python', self.wf.workflowfile('update_apps.py')]
            run_in_background('update-apps', cmd)
Load apps from cache, update if required
Load apps from cache, update if required
Load apps from cache update if required
def update(self, force=False):
        self.all_email_apps = self.wf.cached_data('all_apps', max_age=0)
        self.system_default_app = self.wf.cached_data('system_default_app',
                                                      max_age=0)
        if self.all_email_apps is None:
            self.all_email_apps = []
        if self.system_default_app is None:
            self.system_default_app = {}
        do_update = False
        if force:
            do_update = True
        elif not self.wf.cached_data_fresh('all_apps', MAX_APP_CACHE_AGE):
            do_update = True
        elif not self.wf.cached_data_fresh('system_default_app',
                                           MAX_APP_CACHE_AGE):
            do_update = True
        if do_update:
            log.debug('Updating application caches ...')
            cmd = ['/usr/bin/python', self.wf.workflowfile('update_apps.py')]
            run_in_background('update-apps', cmd)
def update ( self , force = False ) : self . all_email_apps = self . wf . cached_data ( 'all_apps' , max_age = 0 ) self . system_default_app = self . wf . cached_data ( 'system_default_app' , max_age = 0 ) if self . all_email_apps is None : self . all_email_apps = [ ] if self . system_default_app is None : self . system_default_app = { } do_update = False if force : do_update = True elif not self . wf . cached_data_fresh ( 'all_apps' , MAX_APP_CACHE_AGE ) : do_update = True elif not self . wf . cached_data_fresh ( 'system_default_app' , MAX_APP_CACHE_AGE ) : do_update = True if do_update : log . debug ( 'Updating application caches ...' ) cmd = [ '/usr/bin/python' , self . wf . workflowfile ( 'update_apps.py' ) ] run_in_background ( 'update-apps' , cmd )
Load apps from cache, update if required
Load apps from cache update if required
"""Load apps from cache, update if required""" # Update if required
self
force