My understanding: Yes, you must have an App Engine application, and you 
must run appcfg.py update_queues to create the App Engine Task Queues 
before you can use them.

If you do not have an App Engine application, you should probably be using 
Google Pub/Sub instead. It is many times faster and more scalable, as well 
as supporting more sophisticated use cases. I work on an application that 
makes heavy use of App Engine Task Queues, and while they are pretty good, 
they have some interesting limitations that Pub/Sub solves.

Hope that helps,

Evan



On Monday, May 16, 2016 at 3:00:49 PM UTC-4, Cristian Mastrantono wrote:
>
> After more research... my conclusion is that the queue must be created 
> with a GAE app... and then you can use it from CE through REST API. Because 
> even if I define the queue in my queue.yaml (CE) it is not created. Never. 
>
> Maybe someone can confirm this.
>
> Thanks!
>
> On Monday, May 16, 2016 at 3:40:47 PM UTC-3, Christian F. Howes wrote:
>>
>> Hi,
>>
>> you ask: "*now I'm wondering if the queue must be created first before 
>> start using it"* I am pretty sure that even on GAE you must update 
>> queue.yaml and deploy the new queue before GAE can use it, so I'd assume 
>> that is the same for the REST API.  I don't think that you can create 
>> queues on the fly, but you can use parameters on the tasks, or different 
>> URLs on the tasks to handle them differently.
>>
>> good luck,
>>
>> cfh
>>
>> On Friday, May 13, 2016 at 6:37:05 AM UTC-7, Cristian Mastrantono wrote:
>>>
>>> I'm having trouble dealing with the Pull Task Queue REST API. Whenever I 
>>> try it says "403 - you are not allowed to make this api call". I'm trying 
>>> this in my computer, which is obviously out of the App and Compute Engine.
>>>
>>>
>>> I have my Service account credential, my queue.xml in WEB-INF, and *now 
>>> I'm wondering if the queue must be created first before start using it* ... 
>>> is that necessary?
>>>
>>>
>>> This is my code... Am I missing something?
>>>
>>>
>>> JsonFactory JSON_FACTORY = JacksonFactory.getDefaultInstance();
>>> HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport();
>>>
>>> List<String> scopes = new ArrayList<>();
>>> scopes.add(TaskqueueScopes.TASKQUEUE);
>>> scopes.add(TaskqueueScopes.TASKQUEUE_CONSUMER);
>>>
>>> ClassLoader classloader = Thread.currentThread().getContextClassLoader();
>>> InputStream is = classloader.getResourceAsStream("credential-12356.json");
>>>
>>> GoogleCredential credential = 
>>> GoogleCredential.fromStream(is).createScoped(scopes);
>>>
>>> Taskqueue taskQueue = new Taskqueue.Builder(httpTransport, JSON_FACTORY, 
>>> credential).setApplicationName(APPLICATION_NAME).build();
>>>
>>> Taskqueue.Taskqueues.Get request = taskQueue.taskqueues().get(projectId, 
>>> taskQueueName);
>>> request.setGetStats(true);
>>>
>>> //Get the queue!
>>> TaskQueue queue = request.execute();
>>>
>>>
>>>
>>>
On Monday, May 16, 2016 at 3:00:49 PM UTC-4, Cristian Mastrantono wrote:
>
> After more research... my conclusion is that the queue must be created 
> with a GAE app... and then you can use it from CE through REST API. Because 
> even if I define the queue in my queue.yaml (CE) it is not created. Never. 
>
> Maybe someone can confirm this.
>
> Thanks!
>
> On Monday, May 16, 2016 at 3:40:47 PM UTC-3, Christian F. Howes wrote:
>>
>> Hi,
>>
>> you ask: "*now I'm wondering if the queue must be created first before 
>> start using it"* I am pretty sure that even on GAE you must update 
>> queue.yaml and deploy the new queue before GAE can use it, so I'd assume 
>> that is the same for the REST API.  I don't think that you can create 
>> queues on the fly, but you can use parameters on the tasks, or different 
>> URLs on the tasks to handle them differently.
>>
>> good luck,
>>
>> cfh
>>
>> On Friday, May 13, 2016 at 6:37:05 AM UTC-7, Cristian Mastrantono wrote:
>>>
>>> I'm having trouble dealing with the Pull Task Queue REST API. Whenever I 
>>> try it says "403 - you are not allowed to make this api call". I'm trying 
>>> this in my computer, which is obviously out of the App and Compute Engine.
>>>
>>>
>>> I have my Service account credential, my queue.xml in WEB-INF, and *now 
>>> I'm wondering if the queue must be created first before start using it* ... 
>>> is that necessary?
>>>
>>>
>>> This is my code... Am I missing something?
>>>
>>>
>>> JsonFactory JSON_FACTORY = JacksonFactory.getDefaultInstance();
>>> HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport();
>>>
>>> List<String> scopes = new ArrayList<>();
>>> scopes.add(TaskqueueScopes.TASKQUEUE);
>>> scopes.add(TaskqueueScopes.TASKQUEUE_CONSUMER);
>>>
>>> ClassLoader classloader = Thread.currentThread().getContextClassLoader();
>>> InputStream is = classloader.getResourceAsStream("credential-12356.json");
>>>
>>> GoogleCredential credential = 
>>> GoogleCredential.fromStream(is).createScoped(scopes);
>>>
>>> Taskqueue taskQueue = new Taskqueue.Builder(httpTransport, JSON_FACTORY, 
>>> credential).setApplicationName(APPLICATION_NAME).build();
>>>
>>> Taskqueue.Taskqueues.Get request = taskQueue.taskqueues().get(projectId, 
>>> taskQueueName);
>>> request.setGetStats(true);
>>>
>>> //Get the queue!
>>> TaskQueue queue = request.execute();
>>>
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/5b2a31ed-dcf9-4d60-8d1e-d57ca0b41235%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to