Examples of Task


Examples of com.dianping.cat.core.dal.Task

  @Override
  public void run() {
    String localIp = getLoaclIp();
    while (running) {
      try {
        Task task = findDoingTask(localIp);
        if (task == null) {
          task = findTodoTask();
        }

        boolean again = false;
        if (task != null) {
          try {
            task.setConsumer(localIp);
            if (task.getStatus() == TaskConsumer.STATUS_DOING || updateTodoToDoing(task)) {
              int retryTimes = 0;
              while (!processTask(task)) {
                retryTimes++;
                if (retryTimes < MAX_TODO_RETRY_TIMES) {
                  taskRetryDuration();
                } else {
                  updateDoingToFailure(task);
                  again = true;
                  break;
                }
              }
              if (!again) {
                updateDoingToDone(task);
              }
            }
          } catch (Throwable e) {
            Cat.logError(task.toString(), e);
          }
        } else {
          taskNotFoundDuration();
        }
      } catch (Throwable e) {
View Full Code Here

Examples of com.dyuproject.json.test.Task

        String resource = "src/test/resources/com/dyuproject/json/test/overload_task.json";
        StandardJSON json = new StandardJSON(new OverloadConvertorCache());
        File file = new File(resource);
        BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
        Map<String,Object> map = (Map<String,Object>)json.parse(new ReaderSource(reader));
        Task task = (Task)map.get("task");
        assertTrue(task!=null);
        assertTrue("10".equals(task.getStatus()));
       
        OverloadTask otask = (OverloadTask)map.get("overload_task");
        assertTrue(otask!=null);
        assertTrue(otask.getStatus()==null);
        assertTrue(otask.getStatusInt()==5);
View Full Code Here

Examples of com.dyuproject.protostuff.runtime.CollectionTest.Task

   
    public void testTask() throws Exception
    {
        MappedSchema<Task> schema = getSchema(Task.class);
       
        Task task = CollectionTest.filledTask();
       
        roundTrip(task, schema, schema.getPipeSchema());
    }
View Full Code Here

Examples of com.exedosoft.plat.agent.Task

    List<Task> excuteOverList = new ArrayList<Task>();

    Message aMsg = null;
    for (Iterator it = this.getTasks().iterator(); it.hasNext();) {

      Task aTask = (Task) it.next();
      try {
        aMsg = aTask.perform(this.message);
        OutPool.getPool().addMessage(message.getCommandID(), aMsg);
      } catch (Exception e) {
        System.out.println("?惗??丆惓嵼夞?丅丅丅丅丅丅丅");
        for (Iterator<Task> itFail = excuteOverList.iterator(); itFail
            .hasNext();) {
          Task aFailTask = itFail.next();
          OutPool.getPool().addMessage(message.getCommandID(),
              aFailTask.rollBack(this.message));
        }
        break;
      }

      excuteOverList.add(aTask);
View Full Code Here

Examples of com.extjs.gxt.samples.resources.client.model.Task

    return list;
  }

  public static List<Task> getTasks() {
    List<Task> tasks = new ArrayList<Task>();
    tasks.add(new Task(100, "Ext Forms: Field Anchoring", 112,
        "Integrate 2.0 Forms with 2.0 Layouts", 6, 150, "06/24/2007"));
    tasks.add(new Task(100, "Ext Forms: Field Anchoring", 113, "Implement AnchorLayout",
        4, 150, "06/25/2007"));
    tasks.add(new Task(100, "Ext Forms: Field Anchoring", 114,
        "Add support for multiple types of anchors", 4, 150, "06/27/2007"));
    tasks.add(new Task(100, "Ext Forms: Field Anchoring", 115, "Testing and debugging",
        8, 0, "06/29/2007"));

    tasks.add(new Task(101, "Ext Grid: Single-level Grouping", 101,
        "Add required rendering 'hooks' to GridView", 6, 100, "07/01/2007"));
    tasks.add(new Task(101, "Ext Grid: Single-level Grouping", 102,
        "Extend GridView and override rendering functions", 4, 0, "07/03/2007"));
    tasks.add(new Task(101, "Ext Grid: Single-level Grouping", 103,
        "Extend Store with grouping functionality", 4, 100, "07/04/2007"));
    tasks.add(new Task(101, "Ext Grid: Single-level Grouping", 121,
        "Default CSS Styling", 2, 1000, "07/05/2007"));
    tasks.add(new Task(101, "Ext Grid: Single-level Grouping", 104,
        "Testing and debugging", 6, 100, "07/06/2007"));

    tasks.add(new Task(102, "Ext Grid: Summary Rows", 105, "Ext Grid plugin integration",
        4, 125, "07/01/2007"));
    tasks.add(new Task(102, "Ext Grid: Summary Rows", 106,
        "Summary creation during rendering phase", 6, 125, "07/02/2007"));
    tasks.add(new Task(102, "Ext Grid: Summary Rows", 107,
        "Dynamic summary updates in editor grids", 6, 125, "07/05/2007"));
    tasks.add(new Task(102, "Ext Grid: Summary Rows", 108, "Remote summary integration",
        4, 125, "07/05/2007"));
    tasks.add(new Task(102, "Ext Grid: Summary Rows", 109,
        "Summary renderers and calculators", 4, 125, "07/06/2007"));
    tasks.add(new Task(102, "Ext Grid: Summary Rows", 110,
        "Integrate summaries with GroupingView", 10, 125, "07/11/2007"));
    tasks.add(new Task(102, "Ext Grid: Summary Rows", 111, "Testing and debugging", 8,
        125, "07/15/2007"));
    return tasks;
  }
View Full Code Here

Examples of com.fiveht.tick.api.Task

*/
public class TaskParser extends Parser<Task> {

    @Override
    public Task parse(Element element) {
        Task task = new Task();
       
        try {
            task.setId(getInt(element, "id"));
            task.setName(get(element, "name"));
            task.setPosition(getInt(element, "position"));
            task.setProjectId(getInt(element, "project_id"));
            task.setOpenedOn(getDate(element, "opened_on"));
            task.setBudget(getDecimal(element, "budget"));
            task.setBillable(getBoolean(element, "billable"));
            task.setSumHours(getDecimal(element, "sum_hours"));
            task.setUserCount(getInt(element, "user_count"));
        }
        catch (PropertyVetoException ex) {
            throw new RuntimeException(
                    "PANIC! This is a new object - there should be no vetoing",
                    ex);
View Full Code Here

Examples of com.gcrm.domain.Task

                .append(getJsonHeader(totalRecords, searchCondition, isList));

        String contactName = null;
        String assignedTo = null;
        while (tasks.hasNext()) {
            Task instance = tasks.next();
            int id = instance.getId();
            String subject = instance.getSubject();
            Contact contact = instance.getContact();
            if (contact != null) {
                contactName = contact.getFirst_name() + " "
                        + contact.getLast_name();
            } else {
                contactName = "";
            }
            String relatedObject = CommonUtil.fromNullToEmpty(instance
                    .getRelated_object());
            Date dueDate = instance.getDue_date();
            String dueDateS = "";
            SimpleDateFormat dateFormat = new SimpleDateFormat(
                    Constant.DATE_TIME_FORMAT);
            if (dueDate != null) {
                dueDateS = dateFormat.format(dueDate);
            }

            User user = instance.getAssigned_to();
            if (user != null) {
                assignedTo = user.getName();
            } else {
                assignedTo = "";
            }

            if (isList) {
                User createdBy = instance.getCreated_by();
                String createdByName = "";
                if (createdBy != null) {
                    createdByName = CommonUtil.fromNullToEmpty(createdBy
                            .getName());
                }
                User updatedBy = instance.getUpdated_by();
                String updatedByName = "";
                if (updatedBy != null) {
                    updatedByName = CommonUtil.fromNullToEmpty(updatedBy
                            .getName());
                }
                Date createdOn = instance.getCreated_on();
                String createdOnName = "";
                if (createdOn != null) {
                    createdOnName = dateFormat.format(createdOn);
                }
                Date updatedOn = instance.getUpdated_on();
                String updatedOnName = "";
                if (updatedOn != null) {
                    updatedOnName = dateFormat.format(updatedOn);
                }
View Full Code Here

Examples of com.google.appengine.demos.taskengine.shared.Task

    DomUtils.addEventListener("click", saveButton, new EventListener() {
      public void onBrowserEvent(Event event) {
        if (currentTask == null) {
          // We have a new Task
          currentTask = new Task("", titleField.getValue(),
              detailsField.getValue(), labelMatrix.getCurrentLabelPriority(),
              false);
          if (validateFields(currentTask)) {
            controller.addNewTask(currentTask);
          } else {
View Full Code Here

Examples of com.google.appengine.tools.pipeline.impl.tasks.Task

  private void checkBytes(byte[] bytes) {
    List<Task> reconstituted = FanoutTask.decodeTasks(bytes);
    assertEquals(listOfTasks.size(), reconstituted.size());
    for (int i = 0; i < listOfTasks.size(); i++) {
      Task expected = listOfTasks.get(i);
      Task actual = reconstituted.get(i);
      assertEquals(i, expected, actual);
    }
  }
View Full Code Here

Examples of com.google.devtools.moe.client.Ui.Task

    Codebase refTo = forwardTranslationStack.peek();
    Codebase inverseTranslated = toTranslate;

    for (InverseTranslatorStep inverseStep : inverseSteps) {
      Task task = AppContext.RUN.ui.pushTask("inverseEdit", String.format(
          "Inverse-translating step %s by merging codebase %s onto %s",
          inverseStep.getName(), refTo, refFrom));

      inverseTranslated = inverseStep.getInverseEditor().inverseEdit(
          inverseTranslated, refFrom, refTo, context, options);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.