Maintenance does not clean links

Bug #1035962 reported by Martin T.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gwibber
New
Undecided
Unassigned

Bug Description

At application start, there is a maintenance programmed after the first refresh. This maintenance executes the function maintenance() in storage.py and execute the following sql function to delete the cache when there is over 2000 messages.

self.db.execute("DELETE FROM messages WHERE account = ? AND operation = 'receive' AND stream = 'messages' AND time IN (SELECT CAST (time AS int) FROM (SELECT time FROM messages WHERE account = ? AND operation = 'receive' AND stream = 'messages' AND time != 0 ORDER BY time ASC LIMIT (SELECT COUNT(time) FROM messages WHERE operation = 'receive' AND stream = 'messages' AND account = ? AND time != 0) - 2000) ORDER BY time ASC)", (acct[0],acct[0],acct[0]))

However this sql request is limited to messages where stream = 'messages'. Is there a reason to do so ?

I have two accounts configured on my Gwibber instance (Twitter and StatusNet), the accounts are full of 'links'.

sqlite> select count(*) from messages where stream = 'messages';
4222
sqlite> select count(*) from messages where stream = 'links';
21487

Is there any reason to keep the links ? Why can't me delete it as well ?

Tags: maintenance
Revision history for this message
Martin T. (mart-e) wrote :
description: updated
Martin T. (mart-e)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.