tinderd's auto-delete queue entry

Joe Marcus Clarke marcus at freebsd.org
Mon Jul 21 17:28:21 EDT 2008


Ion-Mihai Tetcu wrote:
> On Mon, 21 Jul 2008 17:03:46 -0400
> Joe Marcus Clarke <marcus at freebsd.org> wrote:
> 
>> Ion-Mihai Tetcu wrote:
>>> On Mon, 21 Jul 2008 16:47:08 -0400
>>> Joe Marcus Clarke <marcus at freebsd.org> wrote:
>>>
>>>> Ion-Mihai Tetcu wrote:
>>>>> Hi,
>>>>>
>>>>> From the README:
>>>>>  Now use:
>>>>>  
>>>>>  # cd ${pb}/scripts && ./tc addBuildPortsQueueEntry -b {BUILD} \
>>>>>          -d {PORT DIRECTORY}
>>>>>  
>>>>>  To add a port to the queue. tinderd will automatically pick it
>>>>> up, run a tinderbuild on it, and will delete the entry after
>>>>> tinderbuild completed.
>>>>>
>>>>> Now, my QA Tindy does something like:
>>>>>  > grep -C 3 ENQUEUED QAT_tinder_commit.sh
>>>>>                         ${TC} addPort -b ${BUILD} -d ${PORT}
>>>>> #                       ${TC} addBuildPortsQueueEntry -b ${BUILD}
>>>>> -d ${PORT} -p ${PRIORITY} QR="insert into build_ports_queue
>>>>> (Build_Ports_Queue_Id, Enqueue_Date, Build_Id, User_Id,
>>>>> Port_Directory, Priority, Host_Id, Email_On_Completion, Status) \
>>>>> values (NULL, NOW(), ${BUILD_ID}, 1, \"${PORT}\", ${PRIORITY}, 1,
>>>>> 0, 'ENQUEUED'); \ insert into commit_mails \ values (NULL,
>>>>> \"${MAIL_ID}\", \"`echo ${COMMITTER} | sed 's/"/\\"/g'`\",
>>>>> \"${COMM_DATE}\", \"${TO}\", \"${SUBJ}\", LAST_INSERT_ID());"
>>>>> ${MYSQL} -e "${QR}"
>>>>>
>>>>> and this queue entries are NOT deleted after the build finishes.
>>>>> Note that I can not use addBuildPortsQueueEntry anymore (commented
>>>>> above) because I need that LAST_INSERT_ID.
>>>>>
>>>>> For "regular" builds I use:
>>>>>   ${TC} addBuildPortsQueueEntry -b ${BUILD} -d ${PORT} -p
>>>>> ${PRIORITY} and this queue entries ARE deleted after the build is
>>>>> finished.
>>>>>
>>>>> Queue entries added via the web interface are also not deleted.
>>>>>
>>>>> 1. I believe there was a bug here that was silently corrected
>>>>> recently since I was using addBuildPortsQueueEntry in both cases
>>>>> and in neither the queue entries were deleted?
>>>> Entries older than 25200 seconds (7 minutes) which are not ENQUEUED
>>>> are deleted every time reorgBuildPortsQueue is called (by tinderd).
>>> And that is called when?
>> In tinderd after a build has completed.  The SQL associated with it
>> is:
>>
>> DELETE FROM build_ports_queue WHERE Host_Id=? AND Enqueue_Date<=? AND 
>> Status != 'ENQUEUED'
> 
> Well, those entries are still there. I watched it for a few days before
> mailing.

Are you using tinderd?  Is the reorg running?  You can uncomment lines 
1957-1960 in TinderboxDS.pm and that will output the SQL queries it 
executes to stderr.

Joe

-- 
Joe Marcus Clarke
FreeBSD GNOME Team	::	gnome at FreeBSD.org
FreeNode / #freebsd-gnome
http://www.FreeBSD.org/gnome


More information about the tinderbox-list mailing list