Merge remote-tracking branch 'origin/dev' into celery
This commit is contained in:
commit
2cdb860d09
3 changed files with 19 additions and 2 deletions
|
|
@ -6,7 +6,8 @@
|
||||||
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
|
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
|
||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers/features/aws-cli:1": {},
|
"ghcr.io/devcontainers/features/aws-cli:1": {},
|
||||||
"ghcr.io/devcontainers/features/docker-in-docker": {}
|
"ghcr.io/devcontainers/features/docker-in-docker": {},
|
||||||
|
"ghcr.io/devcontainers-contrib/features/poetry": {}
|
||||||
},
|
},
|
||||||
"customizations": {
|
"customizations": {
|
||||||
"vscode": {"extensions": [
|
"vscode": {"extensions": [
|
||||||
|
|
@ -18,6 +19,10 @@
|
||||||
]}
|
]}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"containerEnv": {
|
||||||
|
"POETRY_VIRTUALENVS_IN_PROJECT": "true"
|
||||||
|
},
|
||||||
|
|
||||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||||
// "features": {},
|
// "features": {},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import httpx
|
import httpx
|
||||||
|
from langflow.services.manager import initialize_settings_manager
|
||||||
from langflow.services.utils import get_settings_manager
|
from langflow.services.utils import get_settings_manager
|
||||||
from langflow.utils.util import get_number_of_workers
|
from langflow.utils.util import get_number_of_workers
|
||||||
from multiprocess import Process # type: ignore
|
from multiprocess import Process # type: ignore
|
||||||
|
|
@ -30,6 +31,7 @@ def update_settings(
|
||||||
"""Update the settings from a config file."""
|
"""Update the settings from a config file."""
|
||||||
|
|
||||||
# Check for database_url in the environment variables
|
# Check for database_url in the environment variables
|
||||||
|
initialize_settings_manager()
|
||||||
settings_manager = get_settings_manager()
|
settings_manager = get_settings_manager()
|
||||||
if config:
|
if config:
|
||||||
logger.debug(f"Loading settings from {config}")
|
logger.debug(f"Loading settings from {config}")
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ class ServiceManager:
|
||||||
"""
|
"""
|
||||||
Registers a new factory.
|
Registers a new factory.
|
||||||
"""
|
"""
|
||||||
|
if service_factory.service_class.name not in self.factories:
|
||||||
self.factories[service_factory.service_class.name] = service_factory
|
self.factories[service_factory.service_class.name] = service_factory
|
||||||
|
|
||||||
def get(self, service_name: ServiceType):
|
def get(self, service_name: ServiceType):
|
||||||
|
|
@ -90,3 +91,12 @@ def initialize_services():
|
||||||
service_manager.get(ServiceType.CACHE_MANAGER)
|
service_manager.get(ServiceType.CACHE_MANAGER)
|
||||||
# Test database connection
|
# Test database connection
|
||||||
service_manager.get(ServiceType.DATABASE_MANAGER)
|
service_manager.get(ServiceType.DATABASE_MANAGER)
|
||||||
|
|
||||||
|
|
||||||
|
def initialize_settings_manager():
|
||||||
|
"""
|
||||||
|
Initialize the settings manager.
|
||||||
|
"""
|
||||||
|
from langflow.services.settings import factory as settings_factory
|
||||||
|
|
||||||
|
service_manager.register_factory(settings_factory.SettingsManagerFactory())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue