Skip to content

Sync -DRAFT#252

Closed
peterdudfield wants to merge 10 commits into
mainfrom
sync
Closed

Sync -DRAFT#252
peterdudfield wants to merge 10 commits into
mainfrom
sync

Conversation

@peterdudfield

@peterdudfield peterdudfield commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Description

  • Changed all routes to sync not async.
  • use grpc_request
  • fix: to allow forecast/all with one timestamp to be called, and not go to cache
  • Reduced cache to 2 hours (but could increase forecast/all default to 24 hours again)

TODO

  • tidy up some formatting
  • general tidying
  • Add trace_id back in

Memory used to be
Screenshot 2026-03-28 at 09 09 57

Now its
(deployed after 9.15)

Screenshot 2026-03-28 at 11 08 50

You can also see the difference in API performance

Screenshot 2026-03-28 at 18 10 23

Helps with https://github.com/openclimatefix/client-private/issues/294

How Has This Been Tested?

  • CI test
  • ran locally, and cpu much lower (check)
  • ran on dev, and cpu much lower (check)
  • clicked around on UI, and it seems faster

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

@peterdudfield

Copy link
Copy Markdown
Contributor Author

Proof in #255 i think shows that we can keep the fastapi async, but just use grpc-requests instead

@peterdudfield

Copy link
Copy Markdown
Contributor Author

Ill clsoe this, as we do want to have fastapi working with async. Solution seems to be to used grpc-requests

@peterdudfield peterdudfield deleted the sync branch March 30, 2026 13:35
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.

1 participant