[web2py] Re: update_record not working but not failing.

2015-06-02 Thread peter
Okay, useful to know it is not the absence of a commit. Each time the problem has occurred there has not been a ticket. The ipn messages from paypal are rather like a scheduled task. So I use them.They seem to be reliable. But although they passed through the 'update_record', they did crash la

[web2py] Re: update_record not working but not failing.

2015-06-02 Thread Anthony
If this is in the context of an HTTP request, then web2py automatically handles the commit, so calling db.commit() is unnecessary. If the transaction is failing to commit, that means that your code is throwing an exception sometime *after* the confirmation email gets sent to the user (which see

[web2py] Re: update_record not working but not failing.

2015-06-02 Thread peter
Yes Thanks Dmitry Maybe that is the problem. I always forget about commit(). I will add this in. It will take me a while to know if it is the solution as the problem only occurs every few months. If I commit() does not sort it I will report back to the group eventually! Peter -- Resource

[web2py] Re: update_record not working but not failing.

2015-06-02 Thread Dmitry Ermolaev
db.commit() пятница, 22 мая 2015 г., 12:51:00 UTC+3 пользователь peter написал: > > I am using sqlite 3. > > I have a ticket booking system. Transaction.status is set to 'pending' in > the database, when the transaction is initiated. > When the paypal payment completes: > > transaction.sta

Re: [web2py] Re: update_record not working but not failing.

2015-06-01 Thread Anthony
> > I am still bemused that update_record can not know that it has failed and > return a result reflecting this. This is standard practice in computing. > Maybe this is just a weakness of sqlite I do not know. > Well, we don't know where the failure is yet, so hard to say it is the fault of up

Re: [web2py] Re: update_record not working but not failing.

2015-06-01 Thread peter hutchinson
I use the ipn_handling from Paypal to check the database. As I do not know why the update_record fails, I am not certain that several fails could not happen in a row. It only happens rarely so I cannot log it. If things go wrong punters turn up to the jazz club having paid and not having a seat, wh

[web2py] Re: update_record not working but not failing.

2015-06-01 Thread Anthony
And the problem only happens intermittently? If so, is it frequent enough that you could do some logging to figure out what is happening in the cases of failure? If you can do some logging, maybe check things like db._lastsql, transaction.update_record.colset, and transaction.update_record.id r

[web2py] Re: update_record not working but not failing.

2015-06-01 Thread peter
Yes, I remember there was a thread about output_record always not working. Here it works most of the time, but very occasionally fails. Peter On Monday, 1 June 2015 16:13:11 UTC+1, Ian Ryder wrote: > > I can't give specifics as I had to workaround it but I was having a > similar issue last week

[web2py] Re: update_record not working but not failing.

2015-06-01 Thread Ian Ryder
I can't give specifics as I had to workaround it but I was having a similar issue last week with update_record. I'm using it everywhere without issue but one particular method wouldn't update and didn't show any error...if I see it again I'll post up and not work around it (I was having trouble

[web2py] Re: update_record not working but not failing.

2015-06-01 Thread peter
Here is the routine. The emails both before and after get sent fine.. The software sends an email to spinjazzticke...@gmail.com so we have a record of bookings in case of a database meltdown. def paypal_complete_a(): import datetime from paypal import PayPal paypal = PayPal()

[web2py] Re: update_record not working but not failing.

2015-05-26 Thread Anthony
Can you show the full controller code? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google

[web2py] Re: update_record not working but not failing.

2015-05-26 Thread Derek
Well, I suppose you could start by running a profiler on the database to record activity, or you can log all sql statements and see what's going on there. On Saturday, May 23, 2015 at 1:44:25 AM UTC-7, peter wrote: > > It is in a regular HTTP request. I actually somewhat later when someone > t

[web2py] Re: update_record not working but not failing.

2015-05-23 Thread peter
It is in a regular HTTP request. I actually somewhat later when someone turned up to a gig believing they had paid as they had a confirmation email, but the database still said pending. There is no way the database record could get reset to 'pending'. Execution must have passed through the

[web2py] Re: update_record not working but not failing.

2015-05-22 Thread Anthony
We probably need more details. Is the code executed in a regular HTTP request or an external script? How/when are checking whether the update was successful? On Friday, May 22, 2015 at 5:51:00 AM UTC-4, peter wrote: > > I am using sqlite 3. > > I have a ticket booking system. Transaction.status

[web2py] Re: update_record not working but not failing.

2015-05-22 Thread Niphlod
update_record is just an handy shortcut, so it shouldn't (under the hood it just calls update() on the right table with the right values), and I never heard of. On Friday, May 22, 2015 at 11:51:00 AM UTC+2, peter wrote: > > I am using sqlite 3. > > I have a ticket booking system. Transaction.sta