added DataStore.updateCurrentTask()

This commit is contained in:
Josh Holtrop 2011-01-02 12:03:10 -05:00
parent 855068c43f
commit af10a21be7

View File

@ -64,3 +64,16 @@ WHERE id = 0
c.close()
self.conn.commit()
return ct
def updateCurrentTask(self, ct):
c = self.conn.cursor()
c.execute('''
DELETE FROM history
WHERE id = 0
''')
c.execute('''
INSERT INTO history
VALUES (0, ?, ?)
''', (ct.taskid, ct.dt.strftime(HISTORY_DT_FMT)))
c.close()
self.conn.commit()