Project server queue taking long time RRS feed

  • Question

  • Hi,

    I am running a code which assigns the resources from the project team to the tasks in the project based on the role of the user and the role assigned to task, which is done by the use of a custom field.

    I am comparing the role of the task and the resource and assigning him accordingly.

    When I try to iterate over tasks and make an assignment, I have to write the following

     QueueJob qJobtoUpdate = dp.Update();
     JobState jobState = projContext.WaitForQueue(qJobtoUpdate, timeoutSeconds);

    This is done for every task in the project by running a loop, and then after the loop, I checkin the project.

    On analysing, I found that for every single task, the above line takes around 5-8 seconds, and hence makes this process slower.

    Is there a solution for the above scenario. Kindly provide some pointers.

    Thanks & regards,

    Divyang Agrawal

    Thursday, December 19, 2013 11:39 AM