Typo... The cron job runs every 30 minutes. It timeouts no matter if
it is the cron job that timeouts (10 minutes) or from the user (30
seconds). The strange thing is that both timeouts utilize the same
amount of CPU. That brings the question, does the cron job stay idle
for the rest of the 9 and a half minutes? :)

On 3 Dec, 13:14, Tomas Alaeus <tala...@gmail.com> wrote:
> I want to purge old entities from the datastore. How I do this at the
> moment is having a cron job run a script every 30 seconds. The script
> removes entries using deletePersistentAll() via a JDO query object.
>
> Query query = pm.newQuery(Game.class, "lastUpdateTime < ageLimit");
> query.declareParameters("long ageLimit");
> long numRemovedGames = query.deletePersistentAll(ageLimit);
>
> The datastore contains about 2000 or so objects that should be
> removed. However, when I run this the request is killed with a
> DeadlineExceededException and no objects are removed. The same issue
> will happen again, again and again every time the cron job runs since
> no objects are removed.
>
> If I try to use setRange() to limit the number of objects being
> removed, it will throw another exception saying I'm not allowed to do
> that.
>
> Is the only solution to actually get the objects, and then remove them
> one by one?

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

Reply via email to