tinderd's auto-delete queue entry
Ion-Mihai Tetcu
itetcu at FreeBSD.org
Mon Jul 21 17:15:11 EDT 2008
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.
> >>> 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.
> >
> > Hmm. I need to be sure I still have the queue entry when
> > postPortBuild is run.
>
> If you're running tinderd, then you have nothing to worry about. All
> Hooks will be called before the queue is reorg'd.
OK, thanks.
--
IOnut - Un^d^dregistered ;) FreeBSD "user"
"Intellectual Property" is nowhere near as valuable as "Intellect"
FreeBSD committer -> itetcu at FreeBSD.org, PGP Key ID 057E9F8B493A297B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://marcuscom.com/pipermail/tinderbox-list/attachments/20080722/3d76dbe1/attachment.bin>
More information about the tinderbox-list
mailing list