File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 63
63
- name : Build & run epidata
64
64
run : |
65
65
cd ../driver
66
- sudo make web sql="${{ secrets.DB_CONN_STRING }}"
66
+ sudo make web sql="${{ secrets.DB_CONN_STRING }}" rate_limit="999999/second"
67
67
sudo make redis
68
68
- name : Check out delphi-admin
69
69
uses : actions/checkout@v3
Original file line number Diff line number Diff line change 37
37
# test= Only runs tests in the directories provided here, e.g.
38
38
# repos/delphi/delphi-epidata/tests/acquisition/covidcast
39
39
# sql= Overrides the default SQL connection string.
40
+ # rate_limit= Overrides the default rate limit for API requests.
40
41
41
42
42
43
# Set optional argument defaults
56
57
sqlalchemy_uri:=mysql+mysqldb://user:pass@delphi_database_epidata:3306/epidata
57
58
endif
58
59
60
+ ifdef rate_limit
61
+ # Notation found here: https://flask-limiter.readthedocs.io/en/stable/#rate-limit-string-notation
62
+ rate_limit_settings:=--env "RATE_LIMIT=$(rate_limit)"
63
+ else
64
+ # Default behavior is to set the rate limit to "5/hour" for API key tests via this environment variable
65
+ rate_limit_settings:=--env "TESTING_MODE=True"
66
+ endif
67
+
59
68
SHELL: =/bin/sh
60
69
61
70
# Get the Makefile's absolute path: https://stackoverflow.com/a/324782/4784655
104
113
--env "REDIS_PASSWORD=1234" \
105
114
--env "API_KEY_ADMIN_PASSWORD=test_admin_password" \
106
115
--env "API_KEY_REGISTER_WEBHOOK_TOKEN=abc" \
107
- --env "TESTING_MODE=True" \
116
+ $(rate_limit_settings) \
108
117
--network delphi-net --name delphi_web_epidata \
109
118
delphi_web_epidata >$(LOG_WEB) 2>&1 &
110
119
You can’t perform that action at this time.
0 commit comments