0

I tried the following to pass a TaskQueue to a Backend but it didn't work.

Is there a problem with this syntax?

try{
    Queue queue = QueueFactory.getQueue("pine");
    TaskOptions options = TaskOptions.Builder.withUrl("/pine/task/getbusy");

    options = options.param("taskparams", params);
    options = options.header("Host",
    BackendServiceFactory.getBackendService().getBackendAddress("pinetask", 1));

    queue.add(options);
}

backend.xml:

<backends>
  <backend name="pinetask">
    <class>B2</class>
    <instances>1</instances>
    <max-concurrent-requests>1</max-concurrent-requests>
    <options>
      <public>false</public>
      <dynamic>true</dynamic>
    </options>
  </backend>
</backends>
1
  • I presume by "pass a task queue to a backend", you mean "run a task on a backend"? What happens when you try? Commented Jul 10, 2011 at 2:51

2 Answers 2

2

Because Instances 1 mean index 0 ?

Sign up to request clarification or add additional context in comments.

Comments

0

try this for the "Host" header:

options = options.header("Host", BackendServiceFactory.getBackendService().getBackendAddress("pinetask"));

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.