← Back to team overview

gwibber-bugs team mailing list archive

[Bug 1035962] Re: Maintenance does not clean links

 

** Description changed:

  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 =
+ 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 Twitter account is full of 'links' type
+ 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 ?

-- 
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 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
  ?

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


References