tasks scheduler, news views, Obsolete code cleaning

This commit is contained in:
Luciano Gervasoni
2025-03-21 16:13:56 +01:00
parent 8050773906
commit 0c6b5f1ea4
27 changed files with 1051 additions and 1669 deletions

View File

@@ -14,8 +14,6 @@ class DB_Handler():
self._cache_timeout_insert_url = 86400
# Processing error URL, cache time: 2 days
self._cache_timeout_error_url = 86400*2
# URL host slowdown
self.url_host_slowdown_seconds = 5
def insert_raw_urls(self, urls, obj_source, obj_search):
try:
@@ -90,13 +88,6 @@ class DB_Handler():
if (obj_url.status != status):
obj_url.status = status
obj_url.save()
# updating_urls.append(obj_url)
# TODO: Fix enum type issue. Bulk update instead of .save() for each object
# List of objects to bulk update
# updating_urls = []
# ... general processing, append to updating_urls
# Urls.objects.bulk_update(updating_urls, ['status'])
##### Filter URL? -> Invalid
if (status_pattern_match == "invalid"):