Check if Project queue is empty

I want to create several projects in Project Server using CSOM (in a console application). Before I create a new project I want the previous creation operation to be finished (otherwise, from time to time, some operations just throw errors). Is there a way to check if there are any operations in the project queue?

I wanted to use something like this:

bool proccessing = true; while (proccessing) {     Project proj = projContext.Projects.GetByGuid(newProj.Id);     projContext.Load(proj, p => p.QueueJobs);     projContext.ExecuteQuery();      if (proj.QueueJobs.Count == 0)     {         proccessing = false;     }     else     {         Thread.Sleep(5 * 1000);     } } 

The problem is that QueueJobs is always empty even when I see the site publishing operation in the PWA queue.

Replay

Category: development Time: 2016-07-28 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.228 (s). 12 q(s)