| Commit message (Collapse) | Author | Age | Lines |
|
|
|
|
|
|
|
| |
This commit also moves the nested structures for models and views in the
home app into a single module, as they were not split up as part of the
subpackage, with the goal of making this a bit more overseeable.
Part of #674.
|
|
|
|
|
|
|
| |
Adds an explicit setting for static builds instead of relying on the
environment variable.
Signed-off-by: Hassan Abouelela <[email protected]>
|
|
|
|
|
|
|
|
| |
The requests library has been replaced by httpx. It's a drop-in
replacement, but provides a better interface for certain things,
such as client sessions, and sync/async support.
Signed-off-by: Hassan Abouelela <[email protected]>
|
| |
|
|
|
|
| |
The constants module more or less did what belongs to the settings.
|
|
|
|
|
| |
Adds configuration which specifies how routes should be handled when
building a static preview.
|
|
|
| |
In accordance with a poll in #dev-contrib, King Arthur becomes the 6th repository featured on the Python Discord homepage.
|
|
|
|
| |
Not having this timeout could cause a worker to hang indefinitely
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These changes mainly aim to prevent multiple concurrent requests from
deadlocking the table due to the lazy evaluation imposed by `objects.all()`,
and introduce some quality of life changes whilst doing so.
To prevent unwanted locks, the following is done:
- Instead of evaluating the first item of `objects.all()` only in order to
determine when the table was most recently updated, we query for the least
recent updated entry and use that instead. As we use `.first()`, the model
instance is loaded directly.
The following quality of life changes are introduced:
- Instead of manual "update or create" logic for repositories retrieved from
the API, use Django's `update_or_create` instead.
- Instead of manual bulk creation of entries on initial data retrieve, Django's
`bulk_create` method is used instead.
- To allow for local testing of this endpoint without having to manually set up
GitHub REST authorization, anonymous GitHub access is used when no
`GITHUB_TOKEN` is configured.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Replace flake8-annotations with metricity.
|
|
|
| |
This will prevent a 500 server error on our homepage when GitHub's API is down, allowing us to use the cached data we have instead.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The bug was caused by a naive approach to caching and retrieving the data.
This commit rectifies this by making the following changes:
- We will now cache for 1 hour instead of 10 minutes
- If the data is stale but API is rate limited, return cache, not crash.
- If the cache doesn't exist and API is rate limited, return dummy data,
and try again in 10 minutes.
This will prevent all crashes, and should still have more or less the same user experience.
|
|
|
| |
Relint
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
API calls so we don't have to actually call the API every time we run tests.
|