GET /api/v1/push/subscription を頻繁には呼び出さないようにする

This commit is contained in:
tateisu 2018-08-30 12:33:32 +09:00
parent bd51297fdb
commit e7b82c707f
3 changed files with 2 additions and 3 deletions

View File

@ -53,6 +53,7 @@
<w>reblog</w>
<w>reblogged</w>
<w>reblogs</w>
<w>repeatly</w>
<w>sephiroth</w>
<w>sharedpref</w>
<w>shortcode</w>

View File

@ -1332,8 +1332,6 @@ class PollingWorker private constructor(c : Context) {
if(now - nr.last_load >= 60000L * 2) {
nr.last_load = now
for(nTry in 0 .. 3) {
if(job.isJobCancelled) return

View File

@ -366,7 +366,7 @@ class PushSubscriptionHelper(
}
fun updateSubscription(client : TootApiClient) : TootApiResult? {
if( !preventRapid() ) return TootApiResult()
if( !preventRapid() ) return TootApiResult("updateSubscription: prevent repeatedly subscription check.")
val result = updateSubscription_sub(client)
val e = result?.error
if(e != null) addLog(e)