Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

fix: avoid uaid error in webpush preflight #566

Merged
merged 1 commit into from
Jul 28, 2016
Merged

Conversation

bbangert
Copy link
Member

Avoids the uaid error on fetch in the preflight by re-using the existing fetched
data. If the current_month doesn't exist, this is an invalid record so the uaid
is removed as it should've been.

closes #542, #553

@jrconlin, @pjenvey r?

Avoids the uaid error on fetch in the preflight by re-using the existing fetched
data. If the current_month doesn't exist, this is an invalid record so the uaid
is removed as it should've been.

closes #542, #553
@@ -64,7 +64,7 @@ def register(self, uaid, connect, *kwargs):
def amend_msg(self, msg, router_data=None):
return msg

def preflight_check(self, uaid, channel_id):
def preflight_check(self, uaid_data, channel_id):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+💯

@jrconlin
Copy link
Member

+r

Really wonder if it might be worth auditing parameters to see where we can simplify to the dict.

@codecov-io
Copy link

codecov-io commented Jul 28, 2016

Current coverage is 100% (diff: 100%)

Merging #566 into master will not change coverage

@@           master   #566   diff @@
====================================
  Files          42     42          
  Lines        8752   8753     +1   
  Methods         0      0          
  Messages        0      0          
  Branches        0      0          
====================================
+ Hits         8752   8753     +1   
  Misses          0      0          
  Partials        0      0          

Powered by Codecov. Last update 2c8d8a6...333d2ff

if month_table not in self.ap_settings.message_tables:
self.log.info("'current_month' out of scope: {record}",
records=json.dumps(record))
records=json.dumps(uaid_data))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you're here, records= is broken (per {record}) -- maybe change it to uaid instead (if so, "UAID missing .." above too)? channelid= a few lines below is also broken

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't call get_uaid twice for webpush
4 participants