Commit bd640fd3 authored by janis.streib's avatar janis.streib 🦉
Browse files

ADD: missing started time

parent ae993d64
...@@ -12,7 +12,7 @@ import redis ...@@ -12,7 +12,7 @@ import redis
class MacFinderJob(DBObject): class MacFinderJob(DBObject):
def __init__(self, job_id, mac, vlan, bcd, finished=False, failed=False, status=None, vendor=None): def __init__(self, job_id, mac, vlan, bcd, started=datetime.datetime.now(), finished=False, failed=False, status=None, vendor=None):
self.job_id = job_id self.job_id = job_id
self.finished = finished self.finished = finished
self.failed= failed self.failed= failed
...@@ -21,6 +21,7 @@ class MacFinderJob(DBObject): ...@@ -21,6 +21,7 @@ class MacFinderJob(DBObject):
self.vendor = OUI_DB.get(self.mac[:8], None) if vendor is None else vendor self.vendor = OUI_DB.get(self.mac[:8], None) if vendor is None else vendor
self.vlan = vlan if type(vlan) == VLAN else VLAN(**vlan) self.vlan = vlan if type(vlan) == VLAN else VLAN(**vlan)
self.bcd = bcd self.bcd = bcd
self.started = started
def poll(self, session, db, connection): def poll(self, session, db, connection):
if self.finished: if self.finished:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment