feroult / yawp

Kotlin/Java API framework for Google Appengine
http://yawp.io
MIT License
132 stars 20 forks source link

After action method add assync task #73

Closed danilodeLuca closed 7 years ago

danilodeLuca commented 8 years ago

Its similar to pipe behavior, but its linked to a Action call.

Exemple:

Action Method

Maybe adding this to a task queue ....

luanpotter commented 8 years ago

There is already an API to call any action asynchronously. It was something like /endpoint/id/action/async. It immediately returns an id that can be polled later for the status and response. I don't remember right know how to do it, but @feroult will remember.

feroult commented 8 years ago

@luanpotter I think that in this case he wants to do some sync stuff and then fork an async method to send the email.

@danilodeLuca My suggestion for now is to use QueueService directly (are you doing this?). Encapsulate the parts that use the Appengine API to make it easier to remove the dependency if necessary.

I'm thinking about a way to create an async wrapper without losing important options that the QueueService provides.