Skip to content

Commit

Permalink
Revert "Revert "Add coarse values to importer rate limiting""
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Lamb committed Feb 1, 2016
1 parent d6fd337 commit da73afe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion opentreemap/importer/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def run_import_event_validation(import_type, import_event_id, file_obj):
return


@task()
@task(rate_limit=settings.IMPORT_VALIDATION_RATE_LIMIT)
def _validate_rows(import_type, import_event_id, start_row_id):
ie = _get_import_event(import_type, import_event_id)
rows = ie.rows()[start_row_id:(start_row_id+settings.IMPORT_BATCH_SIZE)]
Expand Down
3 changes: 2 additions & 1 deletion opentreemap/opentreemap/settings/default_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@
IMPORT_BATCH_SIZE = 85

# The rate limit for how frequently batches of imports can happen per worker
IMPORT_COMMIT_RATE_LIMIT = "1/m"
IMPORT_COMMIT_RATE_LIMIT = "5/m"
IMPORT_VALIDATION_RATE_LIMIT = "10/m"

# We have... issues on IE9 right now
# Disable it on production, but enable it in Debug mode
Expand Down

0 comments on commit da73afe

Please sign in to comment.