From 32c54f0102075ad5e514e45e1bcd92c8d7de86c6 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 28 Apr 2010 05:55:24 -0400 Subject: Update API url and speed up queues. --- server-handler/api.py | 6 +++--- server-handler/queue.yaml | 12 ++++++------ 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("(.*)(.*)") 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 -- cgit v1.2.3-59-g8ed1b