views:

41

answers:

1

First, a little background:

I am using ATrack, an free google app-engine based torrent tracker, and I need some help integrating with it.

I have pasted the (or what i can tell might be) relevant code here as i think its a little too long to put in this post.

If you read carefully you'll see it check to see if the event is stopped. I need it to store the last event but i'm not sure if it already does this or not. This code is a little confusing. If it doesn't i need to figure out a way to make it do that. would like some help on that. The other thing i need to know is how to get information from this, from another script. I can't figure out how to query Memcached. Anyways, any tips, code clips, or suggestions you might have would be greatly appreciated.

A: 

The code you pasted doesn't store anything permanently at all - it's entirely memcache based, and when it receives a stop event, it simply delete that client's IP from memcache. Your best option is probably to add code in the clause that handles the Stop event to record the event in the Datastore.

As far as querying memcache goes, you can't, precisely. You can set by key, and get by key - so you need to know the key you're fetching ahead of time.

Nick Johnson
well actually, once the stop event occurs, i don't need it any more. but i need the information from the other events: started, blank, and completed.
The.Anti.9
In that case, you need to log them all to the Datastore when they happen.
Nick Johnson
But then i'd have to delete it from the datastore as well when i get the stopped event. How would i modify the memcached store to keep the event?
The.Anti.9
You can't - it's a _cache_, so naturally you have to expect that the data can vanish at any time.
Nick Johnson