project server 2010: stop queue from skipping jobs for optimization RRS feed

  • Question

  • Hi,

    I have several consecutive update and publish jobs to be completed in my code. I am getting the projecthaswritelock error that I can not figure out what is causing it. I added a thread.sleep(10000) and that prevented the error from coming up again. I guess the cause of this error is from the queue skipping some of the jobs because the next jobs are dependent on the previous jobs. Does anyone know what may be causing this error and how to stop the queue from skipping jobs for optimization?

    Thursday, February 17, 2011 3:17 PM


  • Hi geo_d,

    The ProjectServer Queue skips jobs for optimization if multiple jobs of the same type are found (e.g. multiple saves... only the last one will be executed). You cannot tell the queue to not skip jobs for optimization.

    You might have to revise the flow of your customization to avoid locks.

    An example: if your code is implementing this flow: For each change to the project: check-out project, save, publish, check-in
    You should change it to: check-out project, make all the changes, save, publish, check-in.

    So validate the flow in your code to make sure you are performing the different actions in the optimal way.

    I hope this helps,

    My EPM blog: Projectopolis
    • Marked as answer by geo_d Monday, February 21, 2011 8:15 AM
    Friday, February 18, 2011 9:39 AM