Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run payday #6 #24

Closed
Changaco opened this issue Mar 16, 2016 · 7 comments
Closed

Run payday #6 #24

Changaco opened this issue Mar 16, 2016 · 7 comments
Labels

Comments

@Changaco
Copy link
Member

Previous: #20.

@Changaco
Copy link
Member Author

DB backup taken. Size is 924kB.

@Changaco
Copy link
Member Author

/o\

Record(id=<redacted>, username=<redacted>, new_balance=Decimal('-0.09'), cur_balance=Decimal('0.00'))
Traceback (most recent call last):
  File "liberapay/billing/payday.py", line 589, in main
    Payday.start().run(log_dir, keep_log)
  File "liberapay/billing/payday.py", line 78, in run
    self.shuffle(log_dir)
  File "liberapay/billing/payday.py", line 120, in shuffle
    self.check_balances(cursor)
  File "liberapay/billing/payday.py", line 397, in check_balances
    raise NegativeBalance()
NegativeBalance: 400 Bad Request

@Changaco
Copy link
Member Author

The user in question has an unfunded donation to a team.

@Changaco
Copy link
Member Author

I came up with a fix. I've been trying to make a failing test for the bug but I haven't been successful yet. So in the meantime I've applied the fix and rerun payday.

@Changaco
Copy link
Member Author

Script ran for 24 seconds (0:00:24.500755).

@Changaco
Copy link
Member Author

# select * from paydays;
 id |           ts_start            |            ts_end             | nparticipants | ntippers | ntippees | ntips | ntransfers | transfer_volume | ntakes | take_volume | nactive | nusers | week_deposits | week_withdrawals 
----+-------------------------------+-------------------------------+---------------+----------+----------+-------+------------+-----------------+--------+-------------+---------+--------+---------------+------------------
  1 | 2016-02-10 14:15:12.857116+00 | 2016-02-10 14:16:20.367284+00 |            20 |        7 |        6 |     5 |         11 |            5.16 |      6 |        2.01 |       9 |     30 |        102.00 |             0.00
  2 | 2016-02-17 09:34:56.46043+00  | 2016-02-17 09:42:30.279562+00 |            24 |        8 |        6 |     5 |         13 |            5.91 |      8 |        3.01 |      10 |     39 |         10.00 |             0.00
  3 | 2016-02-24 12:10:24.637909+00 | 2016-02-24 12:13:54.69294+00  |            31 |        9 |        6 |     5 |         15 |            7.48 |     10 |        4.58 |      11 |     46 |          0.00 |             0.00
  4 | 2016-03-02 13:22:54.690032+00 | 2016-03-02 13:28:28.41217+00  |            42 |       11 |        6 |     5 |         18 |            8.09 |     13 |        5.19 |      12 |     63 |         30.00 |             0.00
  5 | 2016-03-09 10:36:00.199178+00 | 2016-03-09 10:36:17.358605+00 |            47 |       12 |        6 |     6 |         22 |            9.47 |     16 |        5.57 |      13 |     72 |         95.75 |             0.00
  6 | 2016-03-16 12:38:13.996162+00 | 2016-03-16 13:03:30.525192+00 |            56 |       13 |       10 |     7 |         32 |           23.47 |     25 |       19.47 |      17 |     80 |          0.00 |             3.22
(6 rows)

@Changaco
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant