Ejemplo n.º 1
0
 def tasks(self):
     if self.fifo():
         t = task_chain(chains.control(self.que['Queues']['Fifo']))
     else:
         t = []
         for ph in range(0, self.priority_headers):
             t.extend(task_chain(chains.control( \
                 self.que['Queues']['Priority'][ph])))
     return t
Ejemplo n.º 2
0
    def invoke(self, arg, from_tty):
        obj = objects.information.object_return(self.api, self._class)

        inst = chains.control(obj)

        if inst.empty():
            print '     error: empty chain'
            return

        nd = inst.first()
        i = 0
        while not nd.null():
            wd = watchdog.control(nd.cast('Watchdog_Control'))
            print ' #'+str(i)
            print wd.to_string()
            nd.next()
            i += 1
Ejemplo n.º 3
0
    def invoke(self, arg, from_tty):
        obj = objects.information.object_return(self.api, self._class)

        inst = chains.control(obj)

        if inst.empty():
            print('     error: empty chain')
            return

        nd = inst.first()
        i = 0
        while not nd.null():
            wd = watchdog.control(nd.cast('Watchdog_Control'))
            print(' #'+str(i))
            print(wd.to_string())
            nd.next()
            i += 1
Ejemplo n.º 4
0
 def queue(self):
     return task_chain(chains.control(self.info['queue']))
Ejemplo n.º 5
0
 def block2n(self):
     return task_chain(chains.control(self.info['Block2n']))
Ejemplo n.º 6
0
 def tasks(self):
     if self.fifo():
         t = task_chain(chains.control(self.que['Queues']['Fifo']))
     else:
         t = task_tree(rbtrees.control(self.que['Queues']['Priority']))
     return t
Ejemplo n.º 7
0
 def tasks(self):
     if self.fifo():
         t = task_chain(chains.control(self.que['Queues']['Fifo']))
     else:
         t =  task_tree(rbtrees.control(self.que['Queues']['Priority']))
     return t