Compare commits

...

2 Commits

Author SHA1 Message Date
Maxi Quoß 9e9fed767e v2.0.2 2022-03-22 11:11:45 +01:00
seriousm4x 58fedcec48 fix too many db connections
manually close db connection in thread
https://stackoverflow.com/questions/14592729/django-mysql-too-many-connections
2022-03-22 10:42:26 +01:00
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -174,4 +174,4 @@ STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
VERSION = "v2.0.1"
VERSION = "v2.0.2"
+3
View File
@@ -5,6 +5,7 @@ import threading
from asgiref.sync import async_to_sync
from celery import shared_task
from channels.layers import get_channel_layer
from django.db import connection
from django_celery_beat.models import CrontabSchedule, PeriodicTask
from wol.commands import shutdown, wake
@@ -90,6 +91,8 @@ class WolDevice:
"message": data
}})
connection.close()
@shared_task
def ping_all_devices():