コード例 #1
0
 /*
  * Update the task with necessary information when the task is wrong and the product instance exists in the system.
  */
 private void updateErrorTask(
     String vdc, String chefClientname, Task task, String message, Throwable t) {
   String piResource =
       MessageFormat.format(
           propertiesProvider.getProperty(CHEF_NODE_BASE_URL), vdc, chefClientname); // the product
   task.setResult(new TaskReference(piResource));
   updateErrorTask(task, message, t);
 }
コード例 #2
0
 /*
  * Update the task with necessary information when the task is success.
  */
 private void updateSuccessTask(Task task, String vdc, String chefClientname) {
   String piResource =
       MessageFormat.format(
           propertiesProvider.getProperty(CHEF_NODE_BASE_URL), vdc, chefClientname); // the product
   task.setResult(new TaskReference(piResource));
   task.setEndTime(new Date());
   task.setStatus(TaskStates.SUCCESS);
   taskManager.updateTask(task);
 }