Re: [sqlalchemy] StaleDataError on UPDATE for a DATETIME field on multiple consecutive requests

2023-09-02 Thread Dumitru Gîra
ohting wrong with it. > > On Fri, Sep 1, 2023, at 12:09 PM, Dumitru Gîra wrote: > > Hi Mike, > thanks for the quick response. > > These would be the debug logs for > > import requests > for i in range(2): > r = requests.put('http://0.0.0.0:8080/update-datetime')

[sqlalchemy] StaleDataError on UPDATE for a DATETIME field on multiple consecutive requests

2023-09-01 Thread Dumitru Gîra
I have encountered a very strange behaviour and I don't know where to look further. I have a small API https://pastebin.com/qW01jNz8 with 2 endpoints: one to update the name (VARCHAR) and one to update the last_login (DATETIME). If I make 10 consecutive requests to /update-string - everything

Re: [sqlalchemy] StaleDataError on UPDATE for a DATETIME field on multiple consecutive requests

2023-09-01 Thread Dumitru Gîra
Issues like strings vs. datetimes and/or microseconds portions > being present or non-present are the most common. > > would need to see SQL debug logging to have more insight / confirm that's > the problem. > > On Fri, Sep 1, 2023, at 11:59 AM, Dumitru Gîra wrote: > >