was about to get ice cream, celebrating the completion of the payments thing — because I had done all I could do without getting some questions answered first — but actually I can do more. I don't know how much to pay people, but I know a lower-bound on how much to pay them, so I can pay them that, and I can raise it later if I discover it should be higher, since the system will remember how much it has paid people, and pay them the extra that they deserve..
so we decided that one person was successfully paid, so I assume payment is working. Let's plug in the conservative payment estimate, and make it pay everyone..
..need music.. Catie Curtis..
ok, let's pay people. here goes..
well, it's slowly paying people, but seems to be working..
now we also need to display to people in the UI that they've been paid..
..hm.. I got a payment error paying someone $0.75. I think maybe $1 is the minimum payment I can make (this was the first payment under $1, and there were payments for exactly $1)..
..ok, I changed the min-payment to $1, let's try running it again..
ok, it's running again.. seems to be going fine.. let's see if these are showing up in the logs..
hm.. I don't see them in the logs.. let's try looking again in a bit.. for now, the payments seemed to go fine, so let's set that up to run on a cron job, and also check in the UI that shows how much one has been paid..
ok, I've added a cron job using the heroku scheduler to run every hour and pay people.
At this point, I would say the bare-minimum has been done for payments.. people get paid what the system thinks they're owed, and they can see how much they've been paid in the interface (although they would need to refresh it to see.. I suppose the interface should refresh that information every hour too).
Hm.. I feel like I want to put in the refresh-every-hour and also change the version number, so people see the new interface, and then call it done..
oh, it updates the user every time the user submits a task anyway, so that's good enough for now.. let's just try updating the version, and see how badly that goes..
hm.. I'm afraid to update the version, because if someone is working on a question, the behavior is that it will wait for them to submit, then tell them that an updated interface is available, asking them to refresh, but also telling them that they can dismiss the dialog if they want to save their work.. implying that they should save their work, but then when they refresh, the task they were working on will no longer be available (because they'll have successfully submitted it), but they won't realize that, and will wonder how to get it back so they can paste in their saved work. alas..
we'll just leave it be for now. Things seem to be working. Let's not rock the boat.
it is a bit stressful writing code where real money is involved.