Skip to content
This repository was archived by the owner on Sep 26, 2018. It is now read-only.

Comments

Subscriber balance zero out when validity expire (Client dependent)#42

Open
shivkumarsah wants to merge 1 commit intofacebookarchive:masterfrom
piyushabad88:sprint2_pr_balance_zero_out
Open

Subscriber balance zero out when validity expire (Client dependent)#42
shivkumarsah wants to merge 1 commit intofacebookarchive:masterfrom
piyushabad88:sprint2_pr_balance_zero_out

Conversation

@shivkumarsah
Copy link
Contributor

Please review subscriber balance zero out feature:

This PR is linked with #40

Copy link
Contributor

@kkroo kkroo left a comment

Choose a reason for hiding this comment

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

how has this been tested?

credit_balance = crdt.PNCounter("default").serialize()
print "Validity expired for Susbcribers %s setting balance to 0" % (
[subscriber.imsi for subscriber in subscribers],)
subscribers.update(crdt_balance=credit_balance) No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

just update the value to zero?

valid_through__lte=today)
if not subscribers:
return # Do nothing
credit_balance = crdt.PNCounter("default").serialize()
Copy link
Contributor

Choose a reason for hiding this comment

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

you don't need to deal with crdt's. You can use the getter/setter Subscriber property balance

@shivkumarsah shivkumarsah changed the title Subscriber balance zero out when validity expire - DO NOT MERGE Subscriber balance zero out when validity expire (Client dependent) Aug 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants