Traccar tc_devices lastupdate not updating to current date.

Tony Shelver4 months ago

Looking at tc_devices, I am updating a particular record (Name, Identifier, even image) and the date doesn't change.

I am on V5.10 running on ubuntu.

Is this supposed to work? I rely on this for sequencing changes in an external database (hold a log of all record changes), and haven't had this being a problem in the past.

Anton Tananaev4 months ago

Last update is for location updates. It has nothing to do with device record updates.

Ashok Chandra4 months ago

@anton how tc_device is updating, I want to know which file in responsible for updating the data in tc_device like status, last update columns.

Table is updating only when we logged in or traccar service is updating the data in background when we are not logged in.

Ashok Chandra4 months ago

@tananaev please do the needful

michael ring2 months ago

I have the same problem after upgrade form v5.4 to v5.12 on production server. Everything is running fine, no error in the logs. All schema changes were made automatically.

But no updates are done. In ConnectionManager.java this is called (and does not fail):

  storage.updateObject(device, new Request(
                        new Columns.Include("status", "lastUpdate"),
                        new Condition.Equals("id", "id")));

But "status", "lastUpdate" are not updated in tc_devices. No errors in db-log and no entries in traccar-log.
This is not critical for our application as we are only forwarding the tc_position-data to our own telematics platform. But nevertheless I would like to fix it in case tc_devices entries might be needed one day.

On production server I am still running mysql 5.7 on ubuntu 22.

Anton Tananaev2 months ago

How do you know that it's getting called and doesn't fail?