sravanareddy / darlaweb

Web server code for DARLA
http://darla.dartmouth.edu/
0 stars 2 forks source link

Throttle jobs to keep under the API quota limit #151

Closed sravanareddy closed 7 years ago

sravanareddy commented 7 years ago

Too many uploads at once cause us to go over the quota temporarily. Need a way to keep track of our usage and delay sending ASR requests to the API.

irenelfeng commented 7 years ago

hmm okay will look into it.

On Thu, Dec 29, 2016 at 8:55 PM, Sravana Reddy notifications@github.com wrote:

Assigned #151 https://github.com/sravanareddy/darlaweb/issues/151 to @irenelfeng https://github.com/irenelfeng.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sravanareddy/darlaweb/issues/151#event-907832864, or mute the thread https://github.com/notifications/unsubscribe-auth/AI-PbzCWU_LsqD-eZ8eXKfQia2Kf6ae2ks5rNHKEgaJpZM4LX-RI .

sravanareddy commented 7 years ago

First step: catch quota-exceeded API responses and store the user's uploaded audio as a task. (Currently, the program just crashes because the API response isn't handled.)

This will at least help us debug (and we'll need this step to queue jobs anyway).