From: martin@piware.de <> Date: Sat, 13 Jun 2009 07:49:09 +0000 (+0200) Subject: workitems: Overwrite data from same day X-Git-Url: https://piware.de/gitweb/?p=bin.git;a=commitdiff_plain;h=e455f9428f8730aa6685382b86a5db7c6429ab5c workitems: Overwrite data from same day --- diff --git a/workitems.py b/workitems.py index b9ee195..8572a75 100755 --- a/workitems.py +++ b/workitems.py @@ -135,6 +135,9 @@ def import_lp(db, name_pattern, release): blueprints = get_blueprints('%s//ubuntu/%s/+specs' % (blueprints_base_url, opts.release), name_pattern) + cur = db.cursor() + cur.execute('DELETE FROM work_items WHERE date = date(CURRENT_TIMESTAMP)') + for bp in blueprints: #print 'Checking', bp bpname = bp.split('/')[-1]