You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Ron Peterson <rp...@mtholyoke.edu> on 2008/12/01 20:50:47 UTC

Re: tasks will not run more often than leaseTime minutes

2008-11-24_22:23:00-0500 Ron Peterson <rp...@mtholyoke.edu>:
> 2008-11-21_11:49:48-0500 Anil Gangolli <an...@busybuddha.org>:

> I updated org/apache/roller/weblogger/pojos/TaskLock.orm.xml and
> modified the UPDATE TaskLock query from
> 
> (formatted for readability)
> 
> UPDATE TaskLock t
> SET t.clientId=?1,
>     t.timeAquired = CURRENT_TIMESTAMP,
>     t.timeLeased= ?2,
>     t.lastRun= ?3
> WHERE t.name=?4 AND
>       t.timeAquired=?5 AND
>       ?6 &lt; CURRENT_TIMESTAMP
> 
> to
> 
> UPDATE TaskLock t
> SET t.clientId=?1,
>     t.timeAquired = CURRENT_TIMESTAMP,
>     t.timeLeased= ?2,
>     t.lastRun= ?3
> WHERE t.name=?4</query>

I changed this back, and instead modified the roller_tasklock table's
timestamp fields to have lower resolution.  That works also.  I know
this was confirmed to work in Oracle, just noting that it also works in
PostgreSQL.

alter table roller_tasklock alter timeacquired type timestamp(2) with time zone;
alter table roller_tasklock alter lastrun type timestamp(2) with time zone;

-- 
Ron Peterson
Network & Systems Manager
Mount Holyoke College
http://www.mtholyoke.edu/~rpeterso
-
I wish my computer would do what I want it to do - not what I tell it to do.