-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed subscribe requests spin forever #114
Comments
More details: in backend/env.py, we have code to subscribe users to our mailing list. We add a job to _subscribe_to_mailchimp to our deferred queue. In that code, the call to mc.subscribe is not bracketed with a try/catch. The mc.subscribe code throws exceptions for known error conditions. The way the GAE code works, if a deferred job throws an exception, the job gets retried later. That leads to the current situation where we have hundred of subscribes trying, and failing, over, and over. Note that just bracketing the mc.subscribe call would 'cure' this, but at least at one point in time, the mc service was temporarily down, and that fail safe came in awfully handy. So, to properly 'fix' this, we'd want to selectively try/catch, and discard known failures (e.g. email invalid, or email is believed to be a spammer), but propagate any unknown exceptions. Alternately, just having the retry logic fire only a few times would also prune things. |
Sample of a typical error: |
And another one: (actual email replaced with dashes) 2014-09-02 22:01:29.397 |
@jwhite66 How do you run tests? I tried
|
@brad is the expert; my recollection is that you had to run from the build directory, and I have the feeling that you have to copy a file as well (perhaps config.json), although I don't recall which file or from where. Hmm. Arguably the most useless comment ever :-/. |
yea some instructions on how to run tests in the README would be great. |
David, have you run a build command first? A
|
@aaronlifshin I don't think so. What's the command? |
Try Grunt local in the root of the repo, followed by python testrunner.py also in the root. This project has a build step which creates a local, development or A
|
@aaronlifshin I did |
@davidxia you then must copy config.json to the backend folder |
@brad thanks that worked. |
I've updated the README to include this step. #130 |
the mc.subscribe python utility will throw an exception on error. That will force the subscribe request to re-queue. That's nice, as sometimes Mailchimp is down, and we retry.
However, for hard failures (e.g. bogus email), it essentially means we go into a loop, trying to subscribe over, and over again.
We could modify the code to catch the set of exceptions that are permanent. Simpler might be to figure out a way to queue the subscribe with a max # of retries.
The text was updated successfully, but these errors were encountered: