Azure / hpcpack

The repo to track public issues for Microsoft HPC Pack product.
MIT License
30 stars 12 forks source link

Question: How do I get notified of changes or new jobs? #21

Open cbergemann opened 2 years ago

cbergemann commented 2 years ago

We are developing a frontend to hpcpack to keep track of jobs, catered to our needs. Currently, the only way we see to update the job list or job progress is to poll the API manually or periodically.

The HPC Job Manager however seems to get updates instantly. Is there a method to get notified of changes somehow? How is it done in the Job Manager? Some kind of Push-API would be very usefull.

YutongSun commented 2 years ago

Hi cbergemann,

Yes, you may subscribe the job and task state changes from the scheduler APIs.

https://docs.microsoft.com/en-us/dotnet/api/microsoft.hpc.scheduler.schedulerjob.onjobstate?view=hpc-sdk-5.1.6115 https://docs.microsoft.com/en-us/dotnet/api/microsoft.hpc.scheduler.schedulerjob.ontaskstate?view=hpc-sdk-5.1.6115