Merge lp:~sergiusens/account-polld/reset_poll into lp:~phablet-team/account-polld/trunk

Proposed by Sergio Schvezov
Status: Merged
Approved by: Sergio Schvezov
Approved revision: 26
Merged at revision: 25
Proposed branch: lp:~sergiusens/account-polld/reset_poll
Merge into: lp:~phablet-team/account-polld/trunk
Prerequisite: lp:~sergiusens/account-polld/twitter_avatar
Diff against target: 17 lines (+4/-2)
1 file modified
cmd/account-polld/account_manager.go (+4/-2)
To merge this branch: bzr merge lp:~sergiusens/account-polld/reset_poll
Reviewer Review Type Date Requested Status
Manuel de la Peña (community) Approve
PS Jenkins bot continuous-integration Approve
Roberto Alsina Pending
Review via email: mp+228428@code.launchpad.net

Commit message

Reset poll on success even when no new notifications come in.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
James Henstridge (jamesh) wrote :

I understand the existing behaviour is a bit suspect, but don't we also want to back off a bit when there are no notifications for a while?

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

On lunes 28 de julio de 2014 05h'20:43 ART, James Henstridge wrote:
> I understand the existing behaviour is a bit suspect, but don't
> we also want to back off a bit when there are no notifications
> for a while?

I thought so as well, but after continous use over the weekend it was sort
of annoying - I'm a dogfooder as well :)

Revision history for this message
Manuel de la Peña (mandel) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cmd/account-polld/account_manager.go'
2--- cmd/account-polld/account_manager.go 2014-07-25 20:06:04 +0000
3+++ cmd/account-polld/account_manager.go 2014-07-27 17:43:21 +0000
4@@ -117,10 +117,12 @@
5 a.watcher.Refresh(a.authData.AccountId)
6 a.authData.Enabled = false
7 }
8- } else if len(n) > 0 {
9+ } else {
10+ if len(n) > 0 {
11+ a.postWatch <- &PostWatch{messages: n, appId: a.plugin.ApplicationId()}
12+ }
13 // on success we reset the timeout to the default interval
14 a.interval = pollInterval
15- a.postWatch <- &PostWatch{messages: n, appId: a.plugin.ApplicationId()}
16 }
17 }
18

Subscribers

People subscribed via source and target branches