Skip to content

Commit

Permalink
Merge pull request #117 from SEKOIA-IO/sc-fix-post-data-to-intake
Browse files Browse the repository at this point in the history
fix(aio) Use env variable to build batch URL
  • Loading branch information
StephKll3c authored Mar 22, 2024
2 parents 3fc01da + d7fafa7 commit e9192b2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.12.1] - 2024-03-22

### Fixed

- Fixes batch url computation

## [1.12.0] - 2024-02-27

### Added
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "sekoia-automation-sdk"

version = "1.12.0"
version = "1.12.1"
description = "SDK to create Sekoia.io playbook modules"
license = "MIT"
readme = "README.md"
Expand Down
4 changes: 3 additions & 1 deletion sekoia_automation/aio/connector.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Contains connector with async version."""

import os
from abc import ABC
from asyncio import AbstractEventLoop, get_event_loop
from collections.abc import AsyncGenerator
Expand Down Expand Up @@ -153,7 +154,8 @@ async def push_data_to_intakes(
list[str]:
"""
self._last_events_time = datetime.utcnow()
batch_api = urljoin(self.configuration.intake_server, "batch")
intake_host = os.getenv("INTAKE_URL", self.configuration.intake_server)
batch_api = urljoin(intake_host, "batch")

result_ids = []

Expand Down

0 comments on commit e9192b2

Please sign in to comment.