when does Dzvents do database commit?
Posted: Thursday 01 September 2022 13:25
When are device updates that are done in DzVentz scripts committed to the database?
I am running a script where I update a device. I print the device value before and after the update statement for debugging purposes. The print shows the same value.
I am then running the script a second time. The before-value then shows the value after the previous update.
So my conclusion is that the database commit takes place when the script finishes?
Does the database also have locking issues? How does domoticz handle this? I am asking because mostly the database update occurs without problems, but sometimes the new value is not inserted into the database, even though the script runs fine and prints all debug messages. Even the latest time the device is updated changes, but the actual value does not.
I am running a script where I update a device. I print the device value before and after the update statement for debugging purposes. The print shows the same value.
I am then running the script a second time. The before-value then shows the value after the previous update.
So my conclusion is that the database commit takes place when the script finishes?
Does the database also have locking issues? How does domoticz handle this? I am asking because mostly the database update occurs without problems, but sometimes the new value is not inserted into the database, even though the script runs fine and prints all debug messages. Even the latest time the device is updated changes, but the actual value does not.