teamrsm / analytic-spraydown

Fulfill all your spraying needs
1 stars 0 forks source link

Fix last access time #66

Closed climbak closed 6 years ago

climbak commented 6 years ago

Currently, last access time is updating every time a user accesses database. This prevents updating if logging in more than once per cache invalidate interval. It should update only after fetching data from mountain project.

SaidPar commented 6 years ago

We only update the last access moment on loading ticks from mountain project.

public void onTicksLoaded(List<Tick> ticks) {
        /* persist to database, then retrieve latest set. */
    m_Db.upsertTicks(ticks, m_CurrentUser.getUserId());
    m_Db.updateAccessMoment(m_CurrentUser.getUserId());