limit the number of videos to process
This commit is contained in:
@@ -477,7 +477,11 @@ class Source(models.Model):
|
|||||||
response = indexer(self.index_url)
|
response = indexer(self.index_url)
|
||||||
if not isinstance(response, dict):
|
if not isinstance(response, dict):
|
||||||
return []
|
return []
|
||||||
return response.get('entries', [])
|
entries = response.get('entries', [])
|
||||||
|
|
||||||
|
if settings.MAX_ENTRIES_PROCESSING:
|
||||||
|
entries = entries[:settings.MAX_ENTRIES_PROCESSING]
|
||||||
|
return entries
|
||||||
|
|
||||||
|
|
||||||
def get_media_thumb_path(instance, filename):
|
def get_media_thumb_path(instance, filename):
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ BACKGROUND_TASK_ASYNC_THREADS = 1 # Number of async tasks to run at on
|
|||||||
MAX_BACKGROUND_TASK_ASYNC_THREADS = 8 # For sanity reasons
|
MAX_BACKGROUND_TASK_ASYNC_THREADS = 8 # For sanity reasons
|
||||||
BACKGROUND_TASK_PRIORITY_ORDERING = 'ASC' # Use 'niceness' task priority ordering
|
BACKGROUND_TASK_PRIORITY_ORDERING = 'ASC' # Use 'niceness' task priority ordering
|
||||||
COMPLETED_TASKS_DAYS_TO_KEEP = 7 # Number of days to keep completed tasks
|
COMPLETED_TASKS_DAYS_TO_KEEP = 7 # Number of days to keep completed tasks
|
||||||
|
MAX_ENTRIES_PROCESSING = 0 # Number of videos to process on source refresh (0 for no limit)
|
||||||
|
|
||||||
SOURCES_PER_PAGE = 100
|
SOURCES_PER_PAGE = 100
|
||||||
MEDIA_PER_PAGE = 144
|
MEDIA_PER_PAGE = 144
|
||||||
|
|||||||
Reference in New Issue
Block a user