Skip to content
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

Reduce API requests by increasing batch size #867

Merged
merged 1 commit into from
May 7, 2024
Merged

Conversation

hyrsky
Copy link
Contributor

@hyrsky hyrsky commented Apr 23, 2024

What was done

The street data API seems to become sometimes unresponsive while the data is re-indexed in a cron job. This was noticed while looking at the cron pod logs.

Street data indexing makes a request to https://kartta.hel.fi/ws/geoserver/avoindata/wfs for each batch of 50 items. Currently, there are enough items for around 150 batches. The indexing happens every 24 hours.

This pull request increases the batch size so that the items are processed in around 15 batches. This should decrease the load to the street data API.

How to install

  • Make sure your instance is up and running on correct branch.
    • git checkout UHF-X-street-data-errors
    • make fresh
  • Run make drush-cr

How to test

  • bash ./docker/openshift/crons/street-data.sh

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@hyrsky hyrsky merged commit 1eab8e7 into dev May 7, 2024
2 checks passed
@hyrsky hyrsky deleted the UHF-X-street-data-errors branch May 7, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants