I would run a task may be every 10(atleast the double the time one player gets for his turn) minutes and that task will be able to work on as many games as possible. And ofcourse this number(10 min) will depend on how soon u want to inform users with the results. But cleaning as many game as u can in one task is important instead of one task per game. This setup will perform better if total games played are more then 24*60/10. Else one task per game is good enough from billing point of view.
Sent from my BlackBerry® wireless device -----Original Message----- From: Mark <[email protected]> Sender: [email protected] Date: Tue, 14 Dec 2010 06:49:44 To: Google App Engine<[email protected]> Reply-To: [email protected] Subject: [google-appengine] Re: Delete or unschedule a task? Hi, yeah maybe that's the best way to go - then I can run a scheduled task every two hours or so per game as a back up just in case, Thanks! On Dec 14, 9:42 am, [email protected] wrote: > I am not expert of task queues, but looking at ur requirment may be u can > leave the future task at player's browser. > Run a javascript timer at the browser and whenver it timeout inform the > server(ajax) and tell the player too. Timer can be set for player's turn and > while he is waiting for other player. And ofcourse then u can run task(server > side) every fix time to clean games(to set game status as finished/abandoned > etc) which have been crashed/browser crash or people have left without > clicking proper buttons on ur app. > May be it will save someof ur cpu and tasks count/billing :). > > Sent from my BlackBerry® wireless device > > > > > > > > -----Original Message----- > From: Mark <[email protected]> > > Sender: [email protected] > Date: Tue, 14 Dec 2010 06:28:30 > To: Google App Engine<[email protected]> > Reply-To: [email protected] > Subject: [google-appengine] Delete or unschedule a task? > > Hi, > > Is there a way to delete or unschedule a task? I've got a multiplayer > game. Whenever a player starts their turn, I schedule a task for now + > n minutes, where n is the total time they have to perform their move. > When the task executes, I check if they have performed the move, if > not, I cancel their turn. But my queue will end up having many > unnecessary tasks in it: > > Round limit = 5 minutes > queued-task: game=abc, check at 5:00pm > queued-task: game=abc, check at 5:01pm > ... > > As each player starts their turn, all the tasks pile on as above. > Ideally I only need one scheduled task in the queue at any given time. > When a player starts their turn, I could flush the queue of all > previous scheduled tasks, which are no longer needed. > > There doesn't appear to be a way to do this, named tasks block > insertion of tasks with the same name, I was hoping to use that as a > trick to find and remove or overwrite the tasks with the same name > (using the game key as a unique identifier)? > > Thanks > > -- > 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 > athttp://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. -- 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.
