Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7a7d8f451e | |||
| 79e8baa609 |
@@ -118,7 +118,7 @@ jobs:
|
|||||||
echo "CalVer tag: $VERSION"
|
echo "CalVer tag: $VERSION"
|
||||||
|
|
||||||
- name: Log in to Gitea Container Registry
|
- name: Log in to Gitea Container Registry
|
||||||
run: echo "${{ github.token }}" | docker login git.farh.net -u ${{ github.actor }} --password-stdin
|
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login git.farh.net -u ${{ github.actor }} --password-stdin
|
||||||
|
|
||||||
- name: Extract metadata
|
- name: Extract metadata
|
||||||
id: meta
|
id: meta
|
||||||
@@ -140,8 +140,6 @@ jobs:
|
|||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
build-args: |
|
build-args: |
|
||||||
APT_CACHE_BUST=${{ github.run_id }}
|
APT_CACHE_BUST=${{ github.run_id }}
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
|
|
||||||
- name: Scan api image for vulnerabilities
|
- name: Scan api image for vulnerabilities
|
||||||
uses: anchore/scan-action@v5
|
uses: anchore/scan-action@v5
|
||||||
@@ -168,7 +166,6 @@ jobs:
|
|||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
build-args: |
|
build-args: |
|
||||||
APT_CACHE_BUST=${{ github.run_id }}
|
APT_CACHE_BUST=${{ github.run_id }}
|
||||||
cache-from: type=gha
|
|
||||||
|
|
||||||
- name: Create git tag
|
- name: Create git tag
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class CacheClient:
|
|||||||
async def get(self, key: str) -> str | None:
|
async def get(self, key: str) -> str | None:
|
||||||
if not self._client:
|
if not self._client:
|
||||||
return None
|
return None
|
||||||
value = await self._client.get(key)
|
value: str | bytes | None = await self._client.get(key)
|
||||||
if value is None:
|
if value is None:
|
||||||
return None
|
return None
|
||||||
if isinstance(value, bytes):
|
if isinstance(value, bytes):
|
||||||
|
|||||||
@@ -121,10 +121,6 @@ if settings.rate_limit_redis_enabled:
|
|||||||
logger.warning("Failed to connect to Redis for rate limiting, using in-memory: %s", e)
|
logger.warning("Failed to connect to Redis for rate limiting, using in-memory: %s", e)
|
||||||
_use_redis = False
|
_use_redis = False
|
||||||
|
|
||||||
_public_limiter: RateLimitBackend
|
|
||||||
_auth_limiter: RateLimitBackend
|
|
||||||
_auth_strict_limiter: RateLimitBackend
|
|
||||||
|
|
||||||
if _use_redis and _redis_client:
|
if _use_redis and _redis_client:
|
||||||
_public_limiter = RedisSlidingWindow(
|
_public_limiter = RedisSlidingWindow(
|
||||||
_redis_client, settings.rate_limit_requests, settings.rate_limit_window_seconds
|
_redis_client, settings.rate_limit_requests, settings.rate_limit_window_seconds
|
||||||
|
|||||||
@@ -117,7 +117,6 @@ def _register_event_listeners():
|
|||||||
event.listen(cls, "before_insert", _set_timestamp_defaults)
|
event.listen(cls, "before_insert", _set_timestamp_defaults)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TEST_JWT_SECRET = secrets.token_urlsafe(32)
|
TEST_JWT_SECRET = secrets.token_urlsafe(32)
|
||||||
TEST_SERVICE_KEY = secrets.token_urlsafe(32)
|
TEST_SERVICE_KEY = secrets.token_urlsafe(32)
|
||||||
TEST_FERNET_KEY = "7reF42nmTwbdN21PBoubGp7h_FU8qSimstmlaMLoRK8="
|
TEST_FERNET_KEY = "7reF42nmTwbdN21PBoubGp7h_FU8qSimstmlaMLoRK8="
|
||||||
|
|||||||
Reference in New Issue
Block a user