Grocy: API db-changed-time (question or issue)

Created on 16 Sep 2019  路  3Comments  路  Source: grocy/grocy

Hi
I would like to use db-changed-time request to grab data's only on change.
But I don't understand... Every time I use this request, it's more like a now().
Is db changing in every read/GET request ?

Great regards

bug

All 3 comments

Yes, that's broken since sessions are stored in the database. It returns the modification time of the database file, but the database is effectively changed on every request due to session info updates...

I will try to fix/improve it...

Thx a lot

Fixed in https://github.com/grocy/grocy/commit/0771d58fe74573e5fb5d1d37ebeb1a53e1abccac.

I thought about just dropping the last_used timestamps for sessions and API keys in the database, but I also think this could be useful information in some situations - so I added that updating these timestamps explicitly does not change the database file modification time, so this should work again...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yarons picture yarons  路  4Comments

cavebeat picture cavebeat  路  5Comments

jglauche picture jglauche  路  4Comments

jayaddison picture jayaddison  路  5Comments

Germs2004 picture Germs2004  路  3Comments