Page MenuHomePhorge

Always try to top-up the wallet on charge
ClosedPublic

Authored by mollekopf on Thu, Nov 21, 9:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 8, 12:18 AM
Unknown Object (File)
Sat, Dec 7, 8:19 AM
Unknown Object (File)
Thu, Dec 5, 3:09 PM
Unknown Object (File)
Mon, Dec 2, 9:44 AM
Unknown Object (File)
Sun, Dec 1, 2:38 PM
Unknown Object (File)
Sun, Dec 1, 3:16 AM
Unknown Object (File)
Sun, Dec 1, 2:23 AM
Unknown Object (File)
Sat, Nov 30, 10:15 PM
Subscribers

Details

Reviewers
machniak
Group Reviewers
Restricted Project
Commits
rKbd20c2866cd6: Always try to top-up the wallet on charge
Summary

There is no need to only conditionally do it, we have the balance check
for that. This makes the behaviour more predictable in case there is
e.g. a mollie outage, which prevents the topup from functioning (which
will likely also fail on the retry jobs).

Diff Detail

Repository
rK kolab
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mollekopf created this revision.
mollekopf added a reviewer: Restricted Project.Thu, Nov 21, 9:52 PM

I was thinking about removing the try/catch. If we make a top-up attempt on every WalletCheck job run there's really no need for dispatching a separate job. The only danger will be that if topUpWallet() always throws the rest of the code will never execute, but how big of a danger is that I'm not sure.

IN any case the code implementing --topup option in wallet:charge will not be needed anymore, and I would at least remove it from the schedule.

Do not retry the payment, we will on the next charge cycle, but make sure email notifications are not interrupted by topup failing.

This revision is now accepted and ready to land.Fri, Nov 22, 2:15 PM
This revision was automatically updated to reflect the committed changes.