def add_jobs(self):
        "Adds all jobs to the queue"
        cronlogger.info(
            'Adding ' + unicode(len(self.jobs)) + ' jobs to the queue.')
        for db in self.databases:
            cronlogger.debug('ADDING JOBS FOR ' + unicode(db))
            cache_key = 'hardtree_' + db + '_last'
            last_accessed = cache.get(cache_key)
            if last_accessed:
                if last_accessed >= time.time() - int(self.qualify_run):
                    for job in self.jobs:
                        cron = CronJob(job, db, self.priority_low)
                        self.queue.append(cron)
                        cronlogger.debug('JOB ADDED ' + unicode(cron))
                else:
                    cronlogger.debug(
                        'JOB DOES NOT QUALIFY ' + unicode(db) + ': NOT USED in last ' + unicode(self.qualify_run))
            else:
                cronlogger.debug(
                    'JOB DOES NOT QUALIFY ' + unicode(db) + ': NO KEY IN cache')
        cronlogger.debug('Queue: ' + unicode(self.jobs))
dataset/ETHPy150Open treeio/treeio/treeio/core/management/commands/runcron.py/CronRunner.add_jobs/original