From 76c84acf76f8678dedc1b315ed542c11fb6e9515 Mon Sep 17 00:00:00 2001 From: Jogi Hofmüller Date: Thu, 11 Aug 2011 12:56:42 +0000 Subject: - found more todos - added titles to some
tags in dataWidget () - wrote Satellite.cronJob () method for updating TLE file and database - calling MmdSatellite.py invokes cronJob () git-svn-id: https://svn.spreadspace.org/mur.sat@125 7de4ea59-55d0-425e-a1af-a3118ea81d4c --- tools/mmd/MmdDb.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'tools/mmd/MmdDb.py') diff --git a/tools/mmd/MmdDb.py b/tools/mmd/MmdDb.py index aa6ff03..356bcfe 100644 --- a/tools/mmd/MmdDb.py +++ b/tools/mmd/MmdDb.py @@ -133,23 +133,16 @@ class Db: self.cursor.execute ('SELECT * FROM ssps WHERE timestamp >=? LIMIT 1', (timestamp,)) return self.cursor.fetchone () + def satelliteDeleteObsoleteSSPs (self, timestamp): + self.cursor.execute ('DELETE FROM ssps WHERE timestamp >=?', (timestamp,)) + self.conn.commit () + def close (self): self.cursor.close () self.conn.close () if __name__ == "__main__": - db = Db () - print db.sessionFind ('1234567890') - db.sessionInit ('1234567890', 'jogi@mur.at', '1') - data = db.sessionFind ('1234567890') - print data['id'], data['email'] - db.sessionDelete ('1234567890') - print db.sessionFind ('1234567890') - print db.userFindId ('1') - db.userCreate ('1', 'Jogi', 'Hofmüller', 'jogi@mur.at', '', '', '', '') - print db.userFindId ('1') - db.userDelete ('1') - + pass # vim: tw=0 ts=2 expandtab # EOF -- cgit v1.2.3