← Back to team overview

gwibber-bugs team mailing list archive

[Bug 1035962] [NEW] Maintenance does not clean links

 

Public bug reported:

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 of the type stream =
'messages'. Is there a reason to do so ?

I have two accounts configured on my gwibber instance (Twitter and
StatusNet), the Twitter account is full of 'links' type

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 ?

** Affects: gwibber
     Importance: Undecided
         Status: New


** Tags: maintenance

-- 
You received this bug notification because you are a member of Gwibber
Bug Heros, which is subscribed to Gwibber.
https://bugs.launchpad.net/bugs/1035962

Title:
  Maintenance does not clean links

Status in Gwibber:
  New

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 of the type stream =
  'messages'. Is there a reason to do so ?

  I have two accounts configured on my gwibber instance (Twitter and
  StatusNet), the Twitter account is full of 'links' type

  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
  ?

To manage notifications about this bug go to:
https://bugs.launchpad.net/gwibber/+bug/1035962/+subscriptions


Follow ups

References