Fetch details, of not found in the database.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Thu, 5 Mar 2015 11:46:47 +0000 (12:46 +0100)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Thu, 5 Mar 2015 11:46:47 +0000 (12:46 +0100)
jobs.py

diff --git a/jobs.py b/jobs.py
index c77a3f7..b49549d 100755 (executable)
--- a/jobs.py
+++ b/jobs.py
@@ -344,6 +344,12 @@ for id, job in jobs.iteritems():
                                if debug >= 2: print '[db] job %s yarn updated' % id
                                changed = 1
 
+               # check for details in DB
+               st.execute('SELECT * FROM jobnodes WHERE jobid=%s', id)
+               data = st.fetchone()
+               if not data:
+                       changed = 1
+
        # get details (intensive!), if new job or any other difference
        jobnodes = dict()
        if job.mapred and (not db or changed):