PipelineFX Forum

Qube! => Developer Customization => Topic started by: methodhai on December 17, 2007, 01:57:30 AM

Title: qbblock puts jobs into pending state in C++
Post by: methodhai on December 17, 2007, 01:57:30 AM
Hi,

I'm a bit confused....according to the documentation, qbblock is suppose to put a job into a "blocked" state. However, qbblock seems to put my jobs into a "pending" state for a long while before turning it to a "blocked" state. I've tried variations of blocking all the work and then the job and vice versa. However, the result is that is always the same.

I'm was just curious if this was the correct behavior and I just need to be patient or is there away to put it into a blocked state more quickly?

Thanks.
Title: Re: qbblock puts jobs into pending state in C++
Post by: anthony on December 17, 2007, 11:45:55 AM
exactly how are you using the qbblock routine?  The routine itself doens't override the supervisor, if the supervisor has dispatched a job, and is waiting for the worker to return back a "Running" state. 

I suspect what you're trying to accomplish is to submit a job, then block it.  The standard method for accomplishing this, is to submit the job already blocked.  To do this, simply submit the job:

QbJob* job = new QbJob();
job->status(QbStatus(QB_STATUS_BLOCKED));
Title: Re: qbblock puts jobs into pending state in C++
Post by: methodhai on December 17, 2007, 07:30:23 PM
Hi Anthony,

We have a GUI app that supplements the Qube GUI. So, it grabs the job from the supervisor and displays it state. The block functionality is similar to how th Qube GUI behaves. It attempts to change the job's current status from RUNNING to BLOCKED. Even if I do it in the Qube GUI I notice the same type of behavior.

I was just wondering...if a request is made to the supervisor to block a job and/or work - does it wait for the work clients to return before setting the state? It doesn't force the worker client in anyway?