tinderd's auto-delete queue entry
Joe Marcus Clarke
marcus at freebsd.org
Mon Jul 21 16:47:08 EDT 2008
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). As long
as you're setting the queue status properly (which is also done by
tinderd), then this pruning should be happening.
>
> 2. What is different between my INSERT and addBuildPortsQueueEntry?
Nothing relevant. The query run by addBuildPortsQueueEntry is:
INSERT INTO build_ports_queue ( Build_Id, User_Id, Port_Directory,
Priority, Host_Id, Email_On_Completion, Enqueue_Date ) VALUES ( ?, ?, ?,
?, ?, '0', NOW() )
The default status is ENQUEUED.
>
> Or maybe I have a trigger broken in my MySQL database?
>
> 3. I suppose the delete from queue is done after running postPortBuild
> Hook, right?
It's done by tinderd.
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