Exemple #1
0
    def process_objects(self, objs, booting=False):
        if booting:
            for uid, o in objs.items():
                log('>>>', oid(o))
            return

        busy = False
        log('Processing {} jobs'.format(len(objs)))

        for uid, o in objs.items():
            if self.expired(o):
                log('Expired', oid(o), o.metadata.creation_timestamp)
                try:
                    self.delete_job_and_pods(o)
                except client.rest.ApiException as ex:
                    if ex.status != 404:
                        raise
                    log('{} {}: {}'.format(ex.status, ex.reason, ex))
                busy = True
        return busy
Exemple #2
0
 def deleted_object(self, o):
     log('-->', oid(o), o.metadata.creation_timestamp)
Exemple #3
0
 def modified_object(self, old, new):
     log('xx>', oid(old), '-->', oid(new), '@',
         new.metadata.creation_timestamp)
Exemple #4
0
 def added_object(self, o):
     log('++>', oid(o), o.metadata.creation_timestamp)
Exemple #5
0
 def process_objects(self, objs, booting=False):
     if booting:
         for uid, o in objs.items():
             log('>>>', oid(o))
     else:
         log('>>> found %i objects' % len(objs))
 def deleted_object(self, o):
     log('-->', oid(o), o.metadata.creation_timestamp)
     self.resolve_handler('deleted', o)
 def modified_object(self, old, new):
     log('xx>', oid(old), '-->', oid(new), '@',
         new.metadata.creation_timestamp)
     self.resolve_handler('modified', old, new)
 def added_object(self, o):
     log('++>', oid(o), '@', o.metadata.creation_timestamp)
     self.resolve_handler('added', o)