Skip to content
Snippets Groups Projects
Commit cd986708 authored by Nico Vermaas's avatar Nico Vermaas
Browse files

switch off silk (it causes db deadlocks under high load)

parent 7f982adf
Branches
No related tags found
No related merge requests found
Pipeline #56132 passed
...@@ -37,7 +37,7 @@ INSTALLED_APPS = [ ...@@ -37,7 +37,7 @@ INSTALLED_APPS = [
'django_tables2', 'django_tables2',
'bootstrap3', 'bootstrap3',
'fontawesome_free', 'fontawesome_free',
'silk', #'silk',
## These are required for ASTRONauth ## These are required for ASTRONauth
'django.contrib.sites', 'django.contrib.sites',
...@@ -59,7 +59,7 @@ MIDDLEWARE = [ ...@@ -59,7 +59,7 @@ MIDDLEWARE = [
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware',
'silk.middleware.SilkyMiddleware', #'silk.middleware.SilkyMiddleware',
] ]
ROOT_URLCONF = 'atdb.urls' ROOT_URLCONF = 'atdb.urls'
...@@ -253,5 +253,5 @@ logger.info("KEYCLOAK_URL:" + KEYCLOAK_URL) ...@@ -253,5 +253,5 @@ logger.info("KEYCLOAK_URL:" + KEYCLOAK_URL)
SESSION_COOKIE_NAME = 'atdb_session_id' SESSION_COOKIE_NAME = 'atdb_session_id'
CSRF_COOKIE_NAME = 'atdb_csrftoken' CSRF_COOKIE_NAME = 'atdb_csrftoken'
SILKY_PYTHON_PROFILER = False #SILKY_PYTHON_PROFILER = False
SILKY_PYTHON_PROFILER_BINARY = False #SILKY_PYTHON_PROFILER_BINARY = False
\ No newline at end of file \ No newline at end of file
...@@ -7,5 +7,5 @@ urlpatterns = [ ...@@ -7,5 +7,5 @@ urlpatterns = [
path('atdb/admin/', admin.site.urls), path('atdb/admin/', admin.site.urls),
path('atdb/api-auth/', include('rest_framework.urls')), path('atdb/api-auth/', include('rest_framework.urls')),
path("atdb/astronauth/", include("astronauth.urls")), # include astronauth path("atdb/astronauth/", include("astronauth.urls")), # include astronauth
path('atdb/silk/', include('silk.urls', namespace='silk')) #path('atdb/silk/', include('silk.urls', namespace='silk'))
] ]
...@@ -6,7 +6,7 @@ django-bootstrap3==14.2.0 ...@@ -6,7 +6,7 @@ django-bootstrap3==14.2.0
django-cors-headers==3.6.0 django-cors-headers==3.6.0
django-extensions==3.1.0 django-extensions==3.1.0
django-filter==2.3.0 django-filter==2.3.0
django-silk==5.0.3 #django-silk==5.0.3
django-tables2==2.3.4 django-tables2==2.3.4
djangorestframework==3.12.2 djangorestframework==3.12.2
fontawesome-free==5.15.2 fontawesome-free==5.15.2
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
{% include 'taskdatabase/pagination.html' %} {% include 'taskdatabase/pagination.html' %}
</div> </div>
</div> </div>
<p class="footer"> Version 21 Aug 2023 <p class="footer"> Version 22 Aug 2023
</div> </div>
{% include 'taskdatabase/refresh.html' %} {% include 'taskdatabase/refresh.html' %}
......
...@@ -17,7 +17,7 @@ from django_tables2.views import SingleTableMixin ...@@ -17,7 +17,7 @@ from django_tables2.views import SingleTableMixin
from django.shortcuts import render, redirect, reverse from django.shortcuts import render, redirect, reverse
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from rest_framework.request import Request from rest_framework.request import Request
from silk.profiling.profiler import silk_profile #from silk.profiling.profiler import silk_profile
from django.conf import settings from django.conf import settings
from .models import Task, Workflow, LogEntry, Configuration, Job, PostProcessingRule, Monitor, LatestMonitor, State from .models import Task, Workflow, LogEntry, Configuration, Job, PostProcessingRule, Monitor, LatestMonitor, State
...@@ -213,7 +213,7 @@ class IndexView(ListView): ...@@ -213,7 +213,7 @@ class IndexView(ListView):
# by default this returns the list in an object called object_list, so use 'object_list' in the html page. # by default this returns the list in an object called object_list, so use 'object_list' in the html page.
# but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html. # but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html.
context_object_name = 'my_tasks' context_object_name = 'my_tasks'
@silk_profile(name='IndexView') #@silk_profile(name='IndexView')
def get_queryset(self): def get_queryset(self):
tasks = get_filtered_tasks(self.request) tasks = get_filtered_tasks(self.request)
...@@ -290,7 +290,7 @@ class ShowQualityPage(ListView): ...@@ -290,7 +290,7 @@ class ShowQualityPage(ListView):
# by default this returns the list in an object called object_list, so use 'object_list' in the html page. # by default this returns the list in an object called object_list, so use 'object_list' in the html page.
# but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html. # but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html.
context_object_name = 'my_tasks' context_object_name = 'my_tasks'
@silk_profile(name='ShowQualityPage') #@silk_profile(name='ShowQualityPage')
def get_queryset(self): def get_queryset(self):
tasks = get_filtered_tasks(self.request) tasks = get_filtered_tasks(self.request)
...@@ -332,7 +332,7 @@ class ShowValidationPage(ListView): ...@@ -332,7 +332,7 @@ class ShowValidationPage(ListView):
# by default this returns the list in an object called object_list, so use 'object_list' in the html page. # by default this returns the list in an object called object_list, so use 'object_list' in the html page.
# but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html. # but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html.
context_object_name = 'my_tasks' context_object_name = 'my_tasks'
@silk_profile(name='ShowValidationPage') #@silk_profile(name='ShowValidationPage')
def get_queryset(self): def get_queryset(self):
#stored_tasks = Task.objects.filter(status__icontains=State.STORED.value) #stored_tasks = Task.objects.filter(status__icontains=State.STORED.value)
...@@ -376,7 +376,7 @@ class ShowFailuresPage(ListView): ...@@ -376,7 +376,7 @@ class ShowFailuresPage(ListView):
# but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html. # but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html.
context_object_name = 'my_tasks' context_object_name = 'my_tasks'
@silk_profile(name='ShowFailuresPage') #@silk_profile(name='ShowFailuresPage')
def get_queryset(self): def get_queryset(self):
#failed_tasks = Task.objects.filter(status__icontains=State.FAILED.value) #failed_tasks = Task.objects.filter(status__icontains=State.FAILED.value)
...@@ -417,7 +417,7 @@ class ShowDiscardedPage(ListView): ...@@ -417,7 +417,7 @@ class ShowDiscardedPage(ListView):
# but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html. # but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html.
context_object_name = 'my_tasks' context_object_name = 'my_tasks'
@silk_profile(name='ShowDiscardedPage') #@silk_profile(name='ShowDiscardedPage')
def get_queryset(self): def get_queryset(self):
discarded_tasks = Task.objects.filter(status__icontains='discarded') discarded_tasks = Task.objects.filter(status__icontains='discarded')
...@@ -456,7 +456,7 @@ class ShowFinishedPage(ListView): ...@@ -456,7 +456,7 @@ class ShowFinishedPage(ListView):
# by default this returns the list in an object called object_list, so use 'object_list' in the html page. # by default this returns the list in an object called object_list, so use 'object_list' in the html page.
# but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html. # but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html.
context_object_name = 'my_tasks' context_object_name = 'my_tasks'
@silk_profile(name='ShowFinishedPage') #@silk_profile(name='ShowFinishedPage')
def get_queryset(self): def get_queryset(self):
###archived_tasks = Task.objects.filter(status=State.FINISHED.value) ###archived_tasks = Task.objects.filter(status=State.FINISHED.value)
...@@ -488,7 +488,7 @@ class ShowFinishedPage(ListView): ...@@ -488,7 +488,7 @@ class ShowFinishedPage(ListView):
# this provides a broad range of filters for the search_box in the GUI # this provides a broad range of filters for the search_box in the GUI
@silk_profile(name='get_filtered_tasks') #@silk_profile(name='get_filtered_tasks')
def get_filtered_tasks(request, pre_filtered_tasks=None, distinct=None): def get_filtered_tasks(request, pre_filtered_tasks=None, distinct=None):
filtered_tasks_as_list = None filtered_tasks_as_list = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment