Quantcast
Channel: VMware Communities : All Content - VMware vCenter Converter SDK
Viewing all articles
Browse latest Browse all 706

Help with getting task progress using vcenter converter SDK api

$
0
0

Hi,

 

I am trying to get the task progress status using SDK Api but i get runtime errors always. Pls help me with the below code.

int progress = 0;  try{  ConverterTaskInfo taskInfo = null;   do  {   System.out.println("--- getProgressStatus ---");    taskInfo = _converterService.converterGetTaskInfo(_converterServerContent.getTaskManager(), conversionJobInfo.getJob());    System.out.println("Getting task details....");    Thread.sleep(1000);  if(taskInfo == null)  {  System.out.println("ERROR: Failed to get task Job info.");  return progress;  }  ConverterTaskInfoState state = taskInfo.getState();  progress = taskInfo.getProgress();  System.out.println("progress is" + progress);  } while (taskInfo.getState() != ConverterTaskInfoState.error && taskInfo.getState() != ConverterTaskInfoState.success);  } catch(Exception e) {  }

Correct me if i am doing something wrong here. If you have any sample in java it would be helpful.

 

Thanks in advance


Viewing all articles
Browse latest Browse all 706

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>