from hestia.service_interface import LazyServiceWrapper from django.conf import settings from executor.manager import default_manager from executor.service import BaseExecutorService def get_executor_backend(): if settings.ENABLE_SCHEDULER: return 'executor.executor_service.ExecutorService' return 'executor.service.BaseExecutorService' backend = LazyServiceWrapper(backend_base=BaseExecutorService, backend_path=get_executor_backend(), options={}) backend.expose(locals()) subscribe = default_manager.subscribe
from hestia.service_interface import LazyServiceWrapper from django.conf import settings from administration.service import AdminService def get_admin_backend(): return settings.ADMIN_BACKEND or 'administration.service.AdminService' def get_admin_options(): return {'models': settings.ADMIN_MODELS} backend = LazyServiceWrapper(backend_base=AdminService, backend_path=get_admin_backend(), options=get_admin_options()) backend.expose(locals())
from hestia.service_interface import LazyServiceWrapper from polyaxon.config_manager import config from tracker.manager import default_manager from tracker.service import TrackerService def get_tracker_backend(): if settings.TRACKER_BACKEND == settings.TRACKER_BACKEND_NOOP: return 'tracker.service.TrackerService' if settings.TRACKER_BACKEND == settings.TRACKER_BACKEND_PUBLISHER: return 'tracker.publish_tracker.PublishTrackerService' return 'tracker.publish_tracker.PublishTrackerService' def get_backend_options(): if settings.TRACKER_BACKEND == settings.TRACKER_BACKEND_NOOP: return {} if settings.TRACKER_BACKEND == settings.TRACKER_BACKEND_PUBLISHER: return {'key': config.tracker_key} return {} backend = LazyServiceWrapper(backend_base=TrackerService, backend_path=get_tracker_backend(), options=get_backend_options()) backend.expose(locals()) subscribe = default_manager.subscribe
from django.conf import settings from hestia.service_interface import LazyServiceWrapper from encryptor.service import EncryptionService def get_conf_backend(): return settings.ENCRYPTION_BACKEND or 'encryptor.service.EncryptionService' backend = LazyServiceWrapper(backend_base=EncryptionService, backend_path=get_conf_backend(), options={}) backend.expose(locals())
from hestia.service_interface import LazyServiceWrapper from django.conf import settings from ci.service import CIService def get_ci_backend(): return settings.CI_BACKEND or 'ci.service.CIService' backend = LazyServiceWrapper(backend_base=CIService, backend_path=get_ci_backend(), options={}) backend.expose(locals())
from hestia.service_interface import LazyServiceWrapper from notifier.managers import default_action_manager, default_event_manager from notifier.service import NotifierService backend = LazyServiceWrapper(backend_base=NotifierService, backend_path='notifier.service.NotifierService', options={}) backend.expose(locals()) subscribe_event = default_event_manager.subscribe subscribe_action = default_action_manager.subscribe
from django.conf import settings from hestia.service_interface import LazyServiceWrapper from stats.base import BaseStatsBackend def get_stats_backend(): if settings.STATS_BACKEND == settings.STATS_BACKEND_NOOP: return 'stats.noop.NoOpStatsBackend' if settings.STATS_BACKEND == settings.STATS_BACKEND_DATADOG: return 'stats.datadog.DatadogStatsBackend' if settings.STATS_BACKEND == settings.STATS_BACKEND_STATSD: return 'stats.statsd.StatsdStatsBackend' return '' backend = LazyServiceWrapper(backend_base=BaseStatsBackend, backend_path=get_stats_backend(), options={}) backend.expose(locals())
from hestia.service_interface import LazyServiceWrapper from django.conf import settings from auditor.manager import default_manager from auditor.service import AuditorService def get_access_backend(): return settings.AUDITOR_BACKEND or 'auditor.service.AuditorService' backend = LazyServiceWrapper(backend_base=AuditorService, backend_path=get_access_backend(), options={}) backend.expose(locals()) subscribe = default_manager.subscribe
from hestia.service_interface import LazyServiceWrapper from ownership.exceptions import OwnershipError from ownership.service import OwnershipService backend = LazyServiceWrapper(backend_base=OwnershipService, backend_path='ownership.service.OwnershipService', options={}) backend.expose(locals())
from hestia.service_interface import LazyServiceWrapper from activitylogs.manager import default_manager from activitylogs.service import ActivityLogService backend = LazyServiceWrapper( backend_base=ActivityLogService, backend_path='activitylogs.service.ActivityLogService', options={}) backend.expose(locals()) subscribe = default_manager.subscribe
from hestia.service_interface import LazyServiceWrapper from executor.manager import default_manager from executor.service import ExecutorService backend = LazyServiceWrapper(backend_base=ExecutorService, backend_path='executor.service.ExecutorService', options={}) backend.expose(locals()) subscribe = default_manager.subscribe
from hestia.service_interface import LazyServiceWrapper from django.conf import settings from stores.service import StoresService def get_paths_backend(): return settings.STORES_BACKEND or 'stores.service.StoresService' backend = LazyServiceWrapper(backend_base=StoresService, backend_path=get_paths_backend(), options={}) backend.expose(locals())
from hestia.service_interface import LazyServiceWrapper from compiler.service import CompilerService backend = LazyServiceWrapper( backend_base=CompilerService, backend_path='compiler.service.CompilerService', options={} ) backend.expose(locals())
from hestia.service_interface import LazyServiceWrapper from publisher.service import PublisherService MESSAGES_COUNT = 50 MESSAGES_TIMEOUT = 5 MESSAGES_TIMEOUT_SHORT = 2 backend = LazyServiceWrapper( backend_base=PublisherService, backend_path='publisher.service.PublisherService', options={} ) backend.expose(locals()) ERROR = 'ERROR'
from hestia.service_interface import LazyServiceWrapper from query.service import QueryService backend = LazyServiceWrapper(backend_base=QueryService, backend_path='query.service.QueryService', options={}) backend.expose(locals())