summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2010-04-28 05:55:24 -0400
committerJason A. Donenfeld <Jason@zx2c4.com>2010-04-28 05:55:24 -0400
commit32c54f0102075ad5e514e45e1bcd92c8d7de86c6 (patch)
treea05806b841b9a1f2fe7e17d4c4a72c31a3b6ecac
parentGet rid of debugger queue. (diff)
downloadMomentSelector-32c54f0102075ad5e514e45e1bcd92c8d7de86c6.tar.xz
MomentSelector-32c54f0102075ad5e514e45e1bcd92c8d7de86c6.zip
Update API url and speed up queues.
-rw-r--r--server-handler/api.py6
-rw-r--r--server-handler/queue.yaml12
2 files changed, 9 insertions, 9 deletions
diff --git a/server-handler/api.py b/server-handler/api.py
index 59231ff..162af1c 100644
--- a/server-handler/api.py
+++ b/server-handler/api.py
@@ -23,11 +23,11 @@ class AnyClipAPI():
self.errorMatch = re.compile("<code>(.*)</code><description>(.*)</description>")
def request(self, method, args = ()):
if method == "authenticate":
- url = "http://api3.anyclip.com/ac_auth/v1/json/authenticate/%s/" % args[0]
+ url = "http://api.anyclip.com/ac_auth/v1/json/authenticate/%s/" % args[0]
else:
if self.apiData.token == None:
self.authenticate()
- url = "http://api3.anyclip.com/ac_api/v1/%s/json/%s/" % (self.apiData.token, method)
+ url = "http://api.anyclip.com/ac_api/v1/%s/json/%s/" % (self.apiData.token, method)
for arg in args:
url += "%s/" % quote_plus(str(arg))
response = fetch(url)
@@ -43,7 +43,7 @@ class AnyClipAPI():
try:
return loads(response.content)
except:
- return ("", "")
+ return None
def authenticate(self):
self.apiData.token = self.request("authenticate", [self.apiData.apiKey])["Token"]
self.apiData.put() \ No newline at end of file
diff --git a/server-handler/queue.yaml b/server-handler/queue.yaml
index 440850d..9328dcc 100644
--- a/server-handler/queue.yaml
+++ b/server-handler/queue.yaml
@@ -1,10 +1,10 @@
queue:
- name: momentcounter
- rate: 1/s
- bucket_size: 1
+ rate: 20/s
+ bucket_size: 20
- name: titleloader
- rate: 1/s
- bucket_size: 1
+ rate: 10/s
+ bucket_size: 20
- name: momentsubmitter
- rate: 1/s
- bucket_size: 1
+ rate: 20/s
+ bucket_size: 20