mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 13:36:35 +00:00
commit
71b2b15239
@ -276,7 +276,6 @@ RUN --mount=type=cache,id=apt-lib-cache,sharing=locked,target=/var/lib/apt \
|
|||||||
pkgconf \
|
pkgconf \
|
||||||
python3 \
|
python3 \
|
||||||
python3-wheel \
|
python3-wheel \
|
||||||
redis-server \
|
|
||||||
curl \
|
curl \
|
||||||
less \
|
less \
|
||||||
&& \
|
&& \
|
||||||
|
2
Pipfile
2
Pipfile
@ -20,7 +20,5 @@ django-basicauth = "*"
|
|||||||
psycopg2-binary = "*"
|
psycopg2-binary = "*"
|
||||||
mysqlclient = "*"
|
mysqlclient = "*"
|
||||||
yt-dlp = "*"
|
yt-dlp = "*"
|
||||||
redis = "*"
|
|
||||||
hiredis = "*"
|
|
||||||
requests = {extras = ["socks"], version = "*"}
|
requests = {extras = ["socks"], version = "*"}
|
||||||
emoji = "*"
|
emoji = "*"
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
bind 127.0.0.1
|
|
||||||
protected-mode yes
|
|
||||||
port 6379
|
|
||||||
tcp-backlog 511
|
|
||||||
timeout 0
|
|
||||||
tcp-keepalive 300
|
|
||||||
daemonize no
|
|
||||||
supervised no
|
|
||||||
loglevel notice
|
|
||||||
logfile ""
|
|
||||||
databases 1
|
|
||||||
always-show-logo no
|
|
||||||
save ""
|
|
||||||
dir /var/lib/redis
|
|
||||||
maxmemory 64mb
|
|
||||||
maxmemory-policy noeviction
|
|
||||||
lazyfree-lazy-eviction no
|
|
||||||
lazyfree-lazy-expire no
|
|
||||||
lazyfree-lazy-server-del no
|
|
||||||
replica-lazy-flush no
|
|
||||||
lazyfree-lazy-user-del no
|
|
||||||
oom-score-adj no
|
|
||||||
oom-score-adj-values 0 200 800
|
|
||||||
appendonly no
|
|
||||||
appendfsync no
|
|
||||||
lua-time-limit 5000
|
|
||||||
slowlog-log-slower-than 10000
|
|
||||||
slowlog-max-len 128
|
|
||||||
latency-monitor-threshold 0
|
|
||||||
notify-keyspace-events ""
|
|
||||||
hash-max-ziplist-entries 512
|
|
||||||
hash-max-ziplist-value 64
|
|
||||||
list-max-ziplist-size -2
|
|
||||||
list-compress-depth 0
|
|
||||||
set-max-intset-entries 512
|
|
||||||
zset-max-ziplist-entries 128
|
|
||||||
zset-max-ziplist-value 64
|
|
||||||
hll-sparse-max-bytes 3000
|
|
||||||
stream-node-max-bytes 4096
|
|
||||||
stream-node-max-entries 100
|
|
||||||
activerehashing yes
|
|
||||||
client-output-buffer-limit normal 0 0 0
|
|
||||||
client-output-buffer-limit replica 256mb 64mb 60
|
|
||||||
client-output-buffer-limit pubsub 32mb 8mb 60
|
|
||||||
hz 10
|
|
||||||
dynamic-hz yes
|
|
@ -1 +0,0 @@
|
|||||||
gunicorn
|
|
@ -1,25 +0,0 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
|
||||||
|
|
||||||
UMASK_SET=${UMASK_SET:-022}
|
|
||||||
umask "$UMASK_SET"
|
|
||||||
|
|
||||||
cd /app || exit
|
|
||||||
|
|
||||||
PIDFILE=/run/app/celery-beat.pid
|
|
||||||
SCHEDULE=/tmp/tubesync-celerybeat-schedule
|
|
||||||
|
|
||||||
if [ -f "${PIDFILE}" ]
|
|
||||||
then
|
|
||||||
PID=$(cat $PIDFILE)
|
|
||||||
echo "Unexpected PID file exists at ${PIDFILE} with PID: ${PID}"
|
|
||||||
if kill -0 $PID
|
|
||||||
then
|
|
||||||
echo "Killing old gunicorn process with PID: ${PID}"
|
|
||||||
kill -9 $PID
|
|
||||||
fi
|
|
||||||
echo "Removing stale PID file: ${PIDFILE}"
|
|
||||||
rm ${PIDFILE}
|
|
||||||
fi
|
|
||||||
|
|
||||||
#exec s6-setuidgid app \
|
|
||||||
# /usr/local/bin/celery --workdir /app -A tubesync beat --pidfile ${PIDFILE} -s ${SCHEDULE}
|
|
@ -1 +0,0 @@
|
|||||||
longrun
|
|
@ -1 +0,0 @@
|
|||||||
gunicorn
|
|
@ -1,24 +0,0 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
|
||||||
|
|
||||||
UMASK_SET=${UMASK_SET:-022}
|
|
||||||
umask "$UMASK_SET"
|
|
||||||
|
|
||||||
cd /app || exit
|
|
||||||
|
|
||||||
PIDFILE=/run/app/celery-worker.pid
|
|
||||||
|
|
||||||
if [ -f "${PIDFILE}" ]
|
|
||||||
then
|
|
||||||
PID=$(cat $PIDFILE)
|
|
||||||
echo "Unexpected PID file exists at ${PIDFILE} with PID: ${PID}"
|
|
||||||
if kill -0 $PID
|
|
||||||
then
|
|
||||||
echo "Killing old gunicorn process with PID: ${PID}"
|
|
||||||
kill -9 $PID
|
|
||||||
fi
|
|
||||||
echo "Removing stale PID file: ${PIDFILE}"
|
|
||||||
rm ${PIDFILE}
|
|
||||||
fi
|
|
||||||
|
|
||||||
#exec s6-setuidgid app \
|
|
||||||
# /usr/local/bin/celery --workdir /app -A tubesync worker --pidfile ${PIDFILE} -l INFO
|
|
@ -1 +0,0 @@
|
|||||||
longrun
|
|
@ -1,4 +0,0 @@
|
|||||||
#!/command/with-contenv bash
|
|
||||||
|
|
||||||
exec s6-setuidgid redis \
|
|
||||||
/usr/bin/redis-server /etc/redis/redis.conf
|
|
@ -1 +0,0 @@
|
|||||||
longrun
|
|
@ -1,19 +0,0 @@
|
|||||||
import os
|
|
||||||
from celery import Celery
|
|
||||||
|
|
||||||
|
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tubesync.settings')
|
|
||||||
REDIS_CONNECTION = os.getenv('REDIS_CONNECTION', 'redis://localhost:6379/0')
|
|
||||||
|
|
||||||
|
|
||||||
app = Celery('tubesync')
|
|
||||||
app.config_from_object('django.conf:settings', namespace='CELERY')
|
|
||||||
app.autodiscover_tasks()
|
|
||||||
app.conf.broker_url = REDIS_CONNECTION
|
|
||||||
app.conf.beat_schedule = {
|
|
||||||
'10-second-beat': {
|
|
||||||
'task': 'sync.tasks.housekeeping_task',
|
|
||||||
'schedule': 60.0,
|
|
||||||
'args': ()
|
|
||||||
},
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user