master.py
def schedule_a_job(self):
        """True if anything was scheduled, else False"""
        with SQLDB.i.transaction() as cur:
            cur.execute('''SELECT id
                           FROM jobs
                           WHERE started_at IS NULL
                           ORDER BY niceness ASC
                           LIMIT 1''')
            try:
                id, = cur.fetchone()
            except TypeError:
                return False

        j = Job(id)
        JobTrackerThread(j, self).start()
        return True
True if anything was scheduled, else False
True if anything was scheduled, else False
True if anything was scheduled else False
def schedule_a_job(self):
        with SQLDB.i.transaction() as cur:
            cur.execute('''SELECT id
                           FROM jobs
                           WHERE started_at IS NULL
                           ORDER BY niceness ASC
                           LIMIT 1''')
            try:
                id, = cur.fetchone()
            except TypeError:
                return False
        j = Job(id)
        JobTrackerThread(j, self).start()
        return True
def schedule_a_job ( self ) : with SQLDB . i . transaction ( ) as cur : cur . execute ( '''SELECT id
                           FROM jobs
                           WHERE started_at IS NULL
                           ORDER BY niceness ASC
                           LIMIT 1''' ) try : id , = cur . fetchone ( ) except TypeError : return False j = Job ( id ) JobTrackerThread ( j , self ) . start ( ) return True
True if anything was scheduled, else False
True if anything was scheduled else False
"""True if anything was scheduled, else False"""
self