gertty/gertty
James E. Blair 86574f5eec Don't enqueue full syncs when going offline
Currently when gertty goes offline, it enqueues a task to sync all
subscribed projects and upload all pending reviews.  The intent
was to make sure gertty resynced quickly in case of an error.
However, because the project syncs were at a different priority
than the initial project syncs, they could interfere with each
other.  If a user started gertty after a period of disuse, the
initial normal priority sync could take a long time.  If it
encountered errors that took it offline, it would enqueue a high
priority project sync, which would then attempt to sync many
of the changes which had already been synced by the normal priority
sync (which had not finished and so had not updated the timestamp
for the project).  Further, this process could repeat if multiple
network errors occured.  Even further, if the network was flapping,
the queue could build up many project sync and upload review tasks
themselves.

The project sync on reconnect should not actually be necessary
because the periodic sync will take care of it, so it is removed
in this change.

The upload changes on reconnect similarly should not be necessary,
but it remains in this change out of an abundance of caution.  In
case an error disrupts a review upload task in such a way that it
is removed from the queue, this should increase the chance it is
still uploaded.  However, no more than one upload reviews task will
appear in the queue, so it should not grow without bound in the case
of repeated network errors.

Change-Id: Ia0be38625da363055b0451ff2ed80fed16281cda
2015-04-08 15:36:15 -04:00
..
alembic Sync own changes regardless of subscription 2015-04-06 07:45:58 -07:00
search Add held changes 2015-04-06 07:45:58 -07:00
view Fix crash on opening a change with missing commits 2015-04-08 15:36:15 -04:00
__init__.py Initial commit 2014-04-29 16:28:49 -07:00
alembic.ini Use alembic 2014-05-07 21:35:07 -04:00
app.py Add a key to return to the project list 2015-04-08 15:35:51 -04:00
commentlink.py Open internal URLs in commentlinks 2015-04-08 15:36:15 -04:00
config.py Support searching by URL 2015-04-06 07:45:58 -07:00
db.py Sync change when missing refs 2015-04-06 07:47:23 -07:00
dbsupport.py Add account table 2014-08-01 15:49:30 -07:00
gitrepo.py Sync change when missing refs 2015-04-06 07:47:23 -07:00
keymap.py Add a key to return to the project list 2015-04-08 15:35:51 -04:00
mywid.py Add a key to return to the project list 2015-04-08 15:35:51 -04:00
palette.py Highlight own name on change screen 2015-04-08 15:36:15 -04:00
requestsexceptions.py Do not display InsecurePlatformWarning 2015-03-23 17:31:45 -07:00
sync.py Don't enqueue full syncs when going offline 2015-04-08 15:36:15 -04:00
version.py Add user-agent and version 2014-08-30 14:55:53 -07:00