do not process workitems with NULL result

This commit is contained in:
Andreas Steffen
2013-06-21 23:25:23 +02:00
parent c219d7e31f
commit e1db511bbd
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -143,7 +143,8 @@ bool policy_stop(database_t *db, int session_id)
e = db->query(db,
"SELECT w.rec_final, w.result, e.policy FROM workitems AS w "
"JOIN enforcements AS e ON w.enforcement = e.id WHERE w.session = ?",
"JOIN enforcements AS e ON w.enforcement = e.id "
"WHERE w.session = ? AND w.result IS NOT NULL",
DB_INT, session_id, DB_INT, DB_TEXT, DB_INT);
if (e)
{
+1 -1
View File
@@ -110,7 +110,7 @@ CREATE TABLE workitems (
argument text NOT NULL,
rec_fail integer NOT NULL,
rec_noresult integer NOT NULL,
rec_final integer DEFAULT 3,
rec_final integer,
result text
);
DROP INDEX IF EXISTS workitems_session;