55e908c3815180415b86f5f27c73856d613fb856,monkeylearn/base.py,ModelEndpointSet,make_request,#ModelEndpointSet#Any#Any#Any#Any#,45

Before Change



                wait = None
                if error_code == "PLAN_RATE_LIMIT":
                    wait = int(re.findall(r"(\d+) seconds", body["detail"])[0])
                elif error_code == "CONCURRENCY_RATE_LIMIT":
                    wait = 2

                if wait:

After Change


                error_code = body.get("error_code")

                wait = None
                if error_code in ("PLAN_RATE_LIMIT", "CONCURRENCY_RATE_LIMIT"):
                    wait = int(body.get("seconds_to_wait", 2))

                if wait:
                    time.sleep(wait)
                    retries_left -= 1
                    continue
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: monkeylearn/monkeylearn-python
Commit Name: 55e908c3815180415b86f5f27c73856d613fb856
Time: 2018-07-13
Author: gonzalosaavedra@gmail.com
File Name: monkeylearn/base.py
Class Name: ModelEndpointSet
Method Name: make_request


Project Name: datascienceinc/Skater
Commit Name: 9e3ad1be4da9bf59e76c22d80a69b0f67db5092c
Time: 2017-11-19
Author: pramitchoudhary@Pramits-MacBook-Pro.local
File Name: skater/core/local_interpretation/text_interpreter.py
Class Name:
Method Name: relevance_wt_transformer


Project Name: comic/grand-challenge.org
Commit Name: e357e1dbcdf36eb12be0bc5043e0a098f94a833a
Time: 2017-05-09
Author: jamesmeakin@gmail.com
File Name: django/comicsite/templatetags/comic_templatetags.py
Class Name: comic_URLNode
Method Name: render