Honour the 'rejected' return from push gateways

Add a timestamp to push tokens so we know the last time they we
got them from the device. Send it to the push gateways so it can
determine whether its failure is more recent than the token.
Stop and remove pushers that have been rejected.
This commit is contained in:
David Baker 2015-01-13 19:48:37 +00:00
parent c06a9063e1
commit 2cb30767fa
6 changed files with 81 additions and 19 deletions

View file

@ -21,6 +21,7 @@ CREATE TABLE IF NOT EXISTS pushers (
app_display_name varchar(64) NOT NULL,
device_display_name varchar(128) NOT NULL,
pushkey blob NOT NULL,
ts BIGINT NOT NULL,
data blob,
last_token TEXT,
last_success BIGINT,