Hi Kaan,
  As long as your task names progress in a deterministic way, you're
at least preventing fanout.  You should just be sure to catch
TaskAlreadyExistsError and TombstonedTaskErrors
(http://code.google.com/appengine/docs/python/taskqueue/exceptions.html).

  If the process that starts the initial chain (what ever generates
'randomname') gets stuck repeating that could trigger a new chain of
tasks unless you've got some logic to prevent that from happening.

  If your check for a marker entity was in a transaction then it
should be a safe, but slower, method as well.

  In either case, making your tasks as idempotent as possible is a
good design choice.


Robert



On Thu, Mar 24, 2011 at 17:17, Kaan Soral <[email protected]> wrote:
> my tasks names continue like randomname1 - samerandomname2 -
> samerandomname3, so in the case that samerandomname2 is executed
> AGAIN, it can't continue by creating samerandomname3, right?
> Of course there will be side effects from randomname2, but they are
> bearable
>
> The previous method I was using was to check for samerandomname2 as a
> key_name in a model, but the problem with that route is that, if
> samerandomname2 fails without creating samerandomname3, the loss is
> great
>
> So a DB limitation causes a big loss, while a task_name limitation may
> cause a small side effect
>
> Any caveats with my way of thinking?
>
> On Mar 24, 9:18 pm, Darien Caldwell <[email protected]> wrote:
>> Well the fact that I said "I have seen it happen" should be
>> sufficient. Believe me, I wouldn't have bothered with all the rewrites
>> if it didn't.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to