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

feat: port unregister command to Rust #1224

Merged
merged 1 commit into from
May 11, 2018
Merged

feat: port unregister command to Rust #1224

merged 1 commit into from
May 11, 2018

Conversation

bbangert
Copy link
Member

@bbangert bbangert commented May 10, 2018

The register command PR should be merged and this rebased on top of master before this is reviewed.

Closes #1205.

@bbangert bbangert requested review from pjenvey and jrconlin May 10, 2018 19:34
@bbangert bbangert changed the title Feat/issue 1205 feat: port unregister command to Rust May 10, 2018
@bbangert bbangert force-pushed the feat/issue-1205 branch 2 times, most recently from c27c9fd to 6bbb545 Compare May 10, 2018 23:47
@codecov-io
Copy link

codecov-io commented May 11, 2018

Codecov Report

Merging #1224 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1224   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files          60      60           
  Lines       10198   10198           
======================================
  Hits        10198   10198
Impacted Files Coverage Δ
autopush/tests/test_integration.py 100% <100%> (ø) ⬆️
autopush/tests/test_rs_integration.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ef30e0...c52abc0. Read the comment docs.

@bbangert bbangert force-pushed the feat/issue-1205 branch 2 times, most recently from 40c842f to 4e24c8d Compare May 11, 2018 15:09
.and_then(move |_| -> MyFuture<_> { Box::new(future::ok(true)) })
.or_else(move |_| -> MyFuture<_> { Box::new(future::ok(false)) });
if code != 200 {
info!("Unregister";
Copy link
Member

Choose a reason for hiding this comment

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

did we want the info! for register then? You said we didn't need it in the other PR

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think we care about successful registers (they all are), but unsubscribes are different cause they can happen for non-user-driven reasons like quota expiration, etc. The Python code always logged the unregisters, which like the registers is a bit pointless. But we definitely want to know about the codes involved in non-user-driven unregisters. Though, I think we want a tagged metric now that you mention it, not a log statement.

@@ -990,22 +994,26 @@ where
) -> Poll<AfterAwaitUnregister<T>, Error> {
debug!("State: AwaitUnRegister");
let msg = match try_ready!(await_unregister.response.poll()) {
call::UnRegisterResponse::Success { success } => {
true => {
Copy link
Member

Choose a reason for hiding this comment

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

since this is a bool now, I think you'd save a few lines of code making this an if/else instead of a match. especially since both blocks return ServerMessage::Unregister

@bbangert bbangert merged commit e59297d into master May 11, 2018
@bbangert bbangert deleted the feat/issue-1205 branch May 11, 2018 17:23
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.

3 participants