fix(tasks): 🐛 Flush not working.
This commit is contained in:
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"conventionalCommits.scopes": ["bot", "db"],
|
||||
"conventionalCommits.scopes": ["bot", "db", "tasks"],
|
||||
"yaml.schemas": {
|
||||
"kubernetes://schema/apps/v1%40deployment": "file:///c%3A/Users/rafab/Documents/Repos/Payphone-1/k8s.yml"
|
||||
}
|
||||
|
||||
+26
-19
@@ -12,21 +12,26 @@ spec:
|
||||
targetPort: 5432
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: postgres-storage
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: openebs-hostpath # Your storage class
|
||||
resources:
|
||||
requests:
|
||||
storage: 20Gi # Adjust storage as needed
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: postgresql
|
||||
spec:
|
||||
serviceName: postgresql
|
||||
replicas: 1 # Single-node PostgreSQL
|
||||
selector:
|
||||
matchLabels:
|
||||
app: postgresql
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: postgresql
|
||||
spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:latest # Standard PostgreSQL image
|
||||
@@ -45,13 +50,15 @@ spec:
|
||||
volumeMounts:
|
||||
- name: postgres-storage
|
||||
mountPath: /var/lib/postgresql/data
|
||||
subPath: postgres
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: postgres-storage
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
storageClassName: openebs-hostpath # Your storage class
|
||||
resources:
|
||||
requests:
|
||||
storage: 20Gi # Adjust storage as needed
|
||||
cpu: "1.5"
|
||||
memory: "3Gi"
|
||||
limits:
|
||||
cpu: "2"
|
||||
memory: "4Gi"
|
||||
volumes:
|
||||
- name: postgres-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: postgres-storage
|
||||
restartPolicy: Always
|
||||
|
||||
+2
-11
@@ -1,17 +1,8 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: tasks
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tasks
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: tasks
|
||||
spec:
|
||||
containers:
|
||||
- name: flush
|
||||
image: git.nyeki.dev/payphone/payphone-tasks:latest
|
||||
|
||||
@@ -47,7 +47,6 @@ class Payphone(commands.AutoShardedBot):
|
||||
help_command=help_command.HelpCommand(),
|
||||
strip_after_prefix=True,
|
||||
case_insensitive=True,
|
||||
owner_ids=[898569996949676052, 777338793803513886],
|
||||
)
|
||||
|
||||
async def on_ready(self) -> None:
|
||||
|
||||
@@ -15,7 +15,7 @@ async def flush():
|
||||
|
||||
from payphone.core import constants, utils, config
|
||||
|
||||
redis = redis.Redis("localhost" if config.IS_DEBUG else "redis")
|
||||
redis = redis.Redis("redis://localhost" if config.IS_DEBUG else "redis://redis")
|
||||
|
||||
pipe = redis.pipeline()
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "payphone"
|
||||
version = "0.14.0"
|
||||
version = "0.15.0"
|
||||
description = "Add your description here"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12"
|
||||
|
||||
+2
-2
@@ -264,7 +264,7 @@ class RunnableHashMixin:
|
||||
|
||||
return self.command("HGETALL", str(key))
|
||||
|
||||
def hincrby(self, key: str, field: str, increment: int) -> int:
|
||||
def hincrby(self, key: str, field: str, increment: int = 1) -> int:
|
||||
"""Increments the number stored at field in the hash stored at key by increment.
|
||||
|
||||
If key does not exist, a new key holding a hash is created. If field does not exist the
|
||||
@@ -274,7 +274,7 @@ class RunnableHashMixin:
|
||||
Args:
|
||||
key (str): The key of the hash whose field to increment.
|
||||
field (str): The field to increment.
|
||||
increment (int): The amount to increment by.
|
||||
increment (int, optional): The amount to increment by. Defaults to 1.
|
||||
|
||||
Returns:
|
||||
int: The amount returned
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
import os
|
||||
import sys
|
||||
import getpass
|
||||
|
||||
try:
|
||||
import requests
|
||||
@@ -12,7 +13,7 @@ except ImportError:
|
||||
sys.exit()
|
||||
|
||||
username = input("Username for git.nyeki.dev: ")
|
||||
password = input("Password for git.nyeki.dev: ")
|
||||
password = getpass.getpass("Password for git.nyeki.dev: ")
|
||||
|
||||
tags = requests.get(
|
||||
"https://git.nyeki.dev/v2/payphone/payphone-shard/tags/list",
|
||||
|
||||
Reference in New Issue
Block a user