Scheduled tasks interval, env vars, view fix
This commit is contained in:
@@ -119,7 +119,7 @@ SCHEDULER_CONFIG = SchedulerConfiguration(
|
|||||||
DEFAULT_SUCCESS_TTL=10 * 60, # Time To Live (TTL) in seconds to keep successful job results
|
DEFAULT_SUCCESS_TTL=10 * 60, # Time To Live (TTL) in seconds to keep successful job results
|
||||||
DEFAULT_FAILURE_TTL=365 * 24 * 60 * 60, # Time To Live (TTL) in seconds to keep job failure information
|
DEFAULT_FAILURE_TTL=365 * 24 * 60 * 60, # Time To Live (TTL) in seconds to keep job failure information
|
||||||
DEFAULT_JOB_TTL=10 * 60, # Time To Live (TTL) in seconds to keep job information
|
DEFAULT_JOB_TTL=10 * 60, # Time To Live (TTL) in seconds to keep job information
|
||||||
DEFAULT_JOB_TIMEOUT=30 * 60, # timeout (seconds) for a job
|
DEFAULT_JOB_TIMEOUT=os.environ.get("JOB_DEFAULT_TIMEOUT", 60*30), # timeout (seconds) for a job
|
||||||
# General configuration values
|
# General configuration values
|
||||||
DEFAULT_WORKER_TTL=10 * 60, # Time To Live (TTL) in seconds to keep worker information after last heartbeat
|
DEFAULT_WORKER_TTL=10 * 60, # Time To Live (TTL) in seconds to keep worker information after last heartbeat
|
||||||
DEFAULT_MAINTENANCE_TASK_INTERVAL=10 * 60, # The interval to run maintenance tasks in seconds. 10 minutes.
|
DEFAULT_MAINTENANCE_TASK_INTERVAL=10 * 60, # The interval to run maintenance tasks in seconds. 10 minutes.
|
||||||
@@ -127,7 +127,6 @@ SCHEDULER_CONFIG = SchedulerConfiguration(
|
|||||||
SCHEDULER_FALLBACK_PERIOD_SECS=120, # Period (secs) to wait before requiring to reacquire locks
|
SCHEDULER_FALLBACK_PERIOD_SECS=120, # Period (secs) to wait before requiring to reacquire locks
|
||||||
)
|
)
|
||||||
SCHEDULER_QUEUES: Dict[str, QueueConfiguration] = {
|
SCHEDULER_QUEUES: Dict[str, QueueConfiguration] = {
|
||||||
# 'default': QueueConfiguration(URL='redis://localhost:6379/0'),
|
|
||||||
'default': QueueConfiguration(URL='redis://{}:{}/{}'.format(os.environ.get("REDIS_HOST", "localhost"), os.environ.get("REDIS_PORT", 6379), os.environ.get("REDIS_DB", 0))),
|
'default': QueueConfiguration(URL='redis://{}:{}/{}'.format(os.environ.get("REDIS_HOST", "localhost"), os.environ.get("REDIS_PORT", 6379), os.environ.get("REDIS_DB", 0))),
|
||||||
'high': QueueConfiguration(URL='redis://{}:{}/{}'.format(os.environ.get("REDIS_HOST", "localhost"), os.environ.get("REDIS_PORT", 6379), os.environ.get("REDIS_DB", 0))),
|
'high': QueueConfiguration(URL='redis://{}:{}/{}'.format(os.environ.get("REDIS_HOST", "localhost"), os.environ.get("REDIS_PORT", 6379), os.environ.get("REDIS_DB", 0))),
|
||||||
'low': QueueConfiguration(URL='redis://{}:{}/{}'.format(os.environ.get("REDIS_HOST", "localhost"), os.environ.get("REDIS_PORT", 6379), os.environ.get("REDIS_DB", 0))),
|
'low': QueueConfiguration(URL='redis://{}:{}/{}'.format(os.environ.get("REDIS_HOST", "localhost"), os.environ.get("REDIS_PORT", 6379), os.environ.get("REDIS_DB", 0))),
|
||||||
|
|||||||
@@ -45,8 +45,11 @@ def url_detail_view(request, id):
|
|||||||
url_content = {}
|
url_content = {}
|
||||||
|
|
||||||
ollama = OllamaClient()
|
ollama = OllamaClient()
|
||||||
# prompt_content = "{}\n{}\n{}".format(url_content.title, url_content.description, url_content.content)
|
try:
|
||||||
prompt_content = "{}".format(url_content.content)
|
# prompt_content = "{}\n{}\n{}".format(url_content.title, url_content.description, url_content.content)
|
||||||
|
prompt_content = "{}".format(url_content.content)
|
||||||
|
except Exception as e:
|
||||||
|
prompt_content = ""
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
'url_item': url_item,
|
'url_item': url_item,
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
"result_ttl": 86400,
|
"result_ttl": 86400,
|
||||||
"cron_string": null,
|
"cron_string": null,
|
||||||
"scheduled_time": "2025-01-01T00:00:00+00:00",
|
"scheduled_time": "2025-01-01T00:00:00+00:00",
|
||||||
"interval": 1,
|
"interval": 8,
|
||||||
"interval_unit": "hours",
|
"interval_unit": "hours",
|
||||||
"successful_runs": 0,
|
"successful_runs": 0,
|
||||||
"failed_runs": 0,
|
"failed_runs": 0,
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
"result_ttl": 86400,
|
"result_ttl": 86400,
|
||||||
"cron_string": null,
|
"cron_string": null,
|
||||||
"scheduled_time": "2025-01-01T00:00:00+00:00",
|
"scheduled_time": "2025-01-01T00:00:00+00:00",
|
||||||
"interval": 1,
|
"interval": 2,
|
||||||
"interval_unit": "hours",
|
"interval_unit": "hours",
|
||||||
"successful_runs": 0,
|
"successful_runs": 0,
|
||||||
"failed_runs": 0,
|
"failed_runs": 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user