diff options
author | Jogi Hofmüller <jogi@mur.at> | 2011-08-11 12:56:42 +0000 |
---|---|---|
committer | Jogi Hofmüller <jogi@mur.at> | 2011-08-11 12:56:42 +0000 |
commit | 76c84acf76f8678dedc1b315ed542c11fb6e9515 (patch) | |
tree | c71842dc7b16523ae4bab0489a79381bd9eaeb18 /tools/mmd/MmdDb.py | |
parent | - found more todos (diff) |
- found more todos
- added titles to some <div> 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
Diffstat (limited to 'tools/mmd/MmdDb.py')
-rw-r--r-- | tools/mmd/MmdDb.py | 17 |
1 files changed, 5 insertions, 12 deletions
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 |