Beispiel #1
0
 def _create_record(timestamp):
     log = manage.IpdevpollJobLog(
         netbox_id=job_handler.netbox.id,
         job_name=job_handler.name,
         end_time=datetime.datetime.fromtimestamp(timestamp),
         duration=duration_in_seconds,
         success=success,
         interval=interval)
     log.save()
Beispiel #2
0
        def _create_record(timestamp):
            netbox = manage.Netbox.objects.get(id=self.netbox.id)
            if netbox.deleted_at:
                _logger.info(
                    "Not logging job to db; delete of this IP device"
                    " was requested at %s", netbox.deleted_at)
                return

            log = manage.IpdevpollJobLog(
                netbox_id=self.netbox.id,
                job_name=self.name,
                end_time=datetime.datetime.fromtimestamp(timestamp),
                duration=duration_in_seconds,
                success=success,
                interval=self.interval)
            log.save()