keboola/syrup-component-bundle

View on GitHub
Resources/config/services.yml

Summary

Maintainability
Test Coverage
services:
    syrup.componentbundle.listener.exception:
        class: Syrup\ComponentBundle\Listener\SyrupExceptionListener
        arguments: [%app_name%, @storage_api, @logger]
        tags:
            - { name: kernel.event_listener, event: kernel.exception, method: onKernelException }
            - { name: kernel.event_listener, event: console.exception, method: onConsoleException }

    syrup.componentbundle.listener.controller:
        class: Syrup\ComponentBundle\Listener\SyrupControllerListener
        tags:
            - { name: kernel.event_listener, event: kernel.controller, method: onKernelController }

#   deprecated
    syrup.monolog.s3_uploader:
        class: Syrup\ComponentBundle\Monolog\Uploader\SyrupS3Uploader
        arguments: [%uploader%]

#   deprecated
    syrup.monolog.json_formatter:
        class: Syrup\ComponentBundle\Monolog\Formatter\SyrupJsonFormatter
        arguments: [%app_name%, @syrup.monolog.s3_uploader, @storage_api]


    syrup.s3_uploader:
            class: Syrup\ComponentBundle\Aws\S3\Uploader
            arguments: [%uploader%]

    syrup.monolog.sapi_handler:
        class: Syrup\ComponentBundle\Monolog\Handler\StorageApiHandler
        arguments: [%app_name%, @storage_api]
    syrup.monolog.syslog_processor:
        class: Syrup\ComponentBundle\Monolog\Processor\SyslogProcessor
        arguments: [%app_name%, @storage_api, @syrup.s3_uploader]
        tags:
            - { name: monolog.processor, method: processRecord, handler: syrup_syslog }
    syrup.monolog.request_processor:
        class: Syrup\ComponentBundle\Monolog\Processor\RequestProcessor
        arguments: [@request_stack, @syrup.s3_uploader]
        tags:
            - { name: monolog.processor, method: processRecord }
    syrup.monolog.job_processor:
        class: Syrup\ComponentBundle\Monolog\Processor\JobProcessor
        tags:
            - { name: monolog.processor, method: processRecord }
    syrup.monolog.formatter:
        class: Syrup\ComponentBundle\Monolog\Formatter\JsonFormatter

    syrup.routing_loader:
        class: Syrup\ComponentBundle\Routing\Loader
        arguments: [%components%]
        tags:
            - { name: routing.loader }

    syrup.temp:
        class: Syrup\ComponentBundle\Filesystem\Temp
        arguments: [%app_name%]

    storage_api:
        class: Syrup\ComponentBundle\Service\StorageApi\StorageApiService
        arguments: [%storage_api.url%]
        calls:
            - [setRequest, ['@?request=']]

    syrup.shared_sapi_client:
        class: Keboola\StorageApi\Client
        arguments: [%shared_sapi%]

    syrup.shared_sapi:
        class: Syrup\ComponentBundle\Service\SharedSapi\SharedSapiService
        arguments: [@syrup.shared_sapi_client]

    syrup.encryptor:
        class: Syrup\ComponentBundle\Encryption\Encryptor
        arguments: [%encryption_key%]

    syrup.elasticsearch:
        class: Elasticsearch\Client
        arguments: [%elasticsearch%]

    syrup.queue_factory:
        class: Syrup\ComponentBundle\Service\Queue\QueueFactory
        arguments: [@doctrine.dbal.syrup_connection, %queue%]

    syrup.job_manager:
        class: Syrup\ComponentBundle\Job\Metadata\JobManager
        arguments: [@syrup.elasticsearch, %job_manager%, %app_name%]

    syrup.job_executor:
        class: Syrup\ComponentBundle\Job\Executor