Project

General

Profile

Deadline timer and dbo

Added by Boris N about 14 years ago

I need run some member-functions of dbo-object with a timer

In main thread I start thread with boost::asio::deadline_timer and boost::asio::io_service::run

When timer expires, member-functions of dbo-object is runned.

It changed object in database. Then expiry time is changed and timer is rerunned

Problem is that this changes affects database only in first time

Then timer changes objects in memory, but not in DB

I use one session for all operations with DB (in all WApplications and in timer thread)

Timer triggering is processed within transaction (in both cases: first running and subsequent rerunnings)

I tried it in Postgres and Sqlite - problem remains

I tried to do .reread() and .flush() of this object - problem remains