Queue Job Events

B

Bryant Likes

Just wondering why there are no events for the Queue. That seems like a
perfect integration point since it would free me from having to check the
Queue every x minutes to see if my job has completed and I need to submit the
next job.

Why are there no Queue Event Handlers?

Is there some other way to tie into the Queue Events?

Thanks for any insights.
 
B

Bryant Likes

Ok so in my research I came across the Project Server 2007 Queue Watch Tool
(http://www.codeplex.com/EPMQueueWatch) which does some of what I'm looking
for, but that still requires polling the server.

I had an idea on how to get around this but was wondering if it was
supported. I know I can query the drafts database to get the list of
incomplete jobs from the MSP_QUEUE_PROJECT_GROUP table. So would it be
unsupported if I were to create a Sql Dependency on a query to that table and
then check the Queue job list when the dependency fires?

I know that creating a SQL dependency enables Service Broker which might
cause me to get into unsupported mode. Would that be true?

Is there some other way to do this?

Thanks!
 
A

Andrew Jacks

Bryant,

I believe that you can read data directly from the any of databases, however
updating invalidates your support. Microsoft also state that they reserve the
right to change these tables without warning and that any software using them
could break after software patches.

Sometimes you have no choice but reference these tables and hope that they
don't change too frequently.

Hope this helps


Interested to see if there are any other methods to track queued jobs
completing/failing etc.
 
B

Bryant Likes

I believe that you can read data directly from the any of databases, however
updating invalidates your support. Microsoft also state that they reserve the
right to change these tables without warning and that any software using them
could break after software patches.

Yes, writing to the database invalidates your support. However, I'm not
clear on if enabling service broker would invalidate support.

Anyone know?

Thanks!
 
G

Guidho

Although there might be no Queue events, you can use some events on the
queue...

The server-side events are tied to the queue. For example:
The StatusUpdateSubmitted event is fired when the corresponding queue job is
finished. The ...Submitting event is fired when the queue job is about to
start.

So this might be a possible way to catch 'queue' events.

I'm planning on writing an article about events and the queue, but I still
need to do some more testing but I don't have the time for it right now...
 
B

Bryant Likes

The server-side events are tied to the queue. For example:
The StatusUpdateSubmitted event is fired when the corresponding queue job is
finished. The ...Submitting event is fired when the queue job is about to
start.

So this might be a possible way to catch 'queue' events.

Ok, now I see what you're saying. Took me a little bit to "get it". :)

So if I submit a publish job then I can know the job is done when the
published event fires, which is pretty much the same thing as a queue event.
I just need to have one for each of my job types.

This should work! I think the only thing I'm still trying to figure out is
what happens if a job fails since no event would get fired. Seems like I'll
probably still have to do some kind of polling to see what is going on.

Thanks for the informative post!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top