Skip to content

Commit

Permalink
Fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
gibber9809 committed Jan 23, 2024
1 parent 1d60817 commit 67036cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

import yaml

from pydantic import BaseModel

from clp_package_utils.general import (
CLP_DEFAULT_CONFIG_FILE_RELATIVE_PATH,
CONTAINER_CLP_HOME,
Expand Down Expand Up @@ -352,7 +354,6 @@ def start_search_scheduler(instance_id: str, clp_config: CLPConfig, container_cl
container_logs_dir = container_clp_config.logs_directory / component_name

clp_site_packages_dir = CONTAINER_CLP_HOME / 'lib' / 'python3' / 'site-packages'
redis_config = container_clp_config.redis
container_start_cmd = [
'docker', 'run',
'-di',
Expand Down Expand Up @@ -465,7 +466,7 @@ def generic_start_worker(component_name: str, instance_id: str, clp_config: CLPC
container_start_cmd.append(clp_config.execution_container)

worker_cmd = [
str(clp_site_packages_dir / 'bin' / 'celery'),
'python3', str(clp_site_packages_dir / 'bin' / 'celery'),
'-A',
celery_method,
'worker',
Expand Down
8 changes: 0 additions & 8 deletions components/clp-py-utils/clp_py_utils/clp_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,6 @@ class SearchScheduler(BaseModel):
jobs_poll_delay: float = 1 # seconds
logging_level: str = 'INFO'

@validator('num_archives_to_search_per_batch')
def validate_num_archives_to_search_per_batch(cls, field):
if not field > 0:
raise ValueError(
f"{cls.__name__}: num_archives_to_search_per_batch {field} is not a valid value"
)
return field

@validator('logging_level')
def validate_logging_level(cls, field):
validate_logging_level_static(cls, field)
Expand Down

0 comments on commit 67036cd

Please sign in to comment.