Skip to content

Commit

Permalink
fix: use absolute import
Browse files Browse the repository at this point in the history
  • Loading branch information
kshychko committed Jan 8, 2024
1 parent a4a1a8a commit 3795bf3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions alb-s3-sqs-es/alb_s3/ingester/ingester.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import os
from time import sleep

from ingester.sink.elasticsearch import ElasticSink
from ingester.source import S3Source
from alb_s3.ingester.sink.elasticsearch import ElasticSink
from alb_s3.ingester.source import S3Source


class Ingester:
Expand Down
6 changes: 3 additions & 3 deletions alb-s3-sqs-es/alb_s3/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import sentry_sdk
from sentry_sdk.integrations.aws_lambda import AwsLambdaIntegration

from .ingester.ingester import Ingester as i
from alb_s3.ingester.ingester import Ingester

sentry_sdk.init(integrations=[AwsLambdaIntegration()], traces_sample_rate=1.0)

Expand All @@ -18,8 +18,8 @@ def lambda_handler(event, context):
bucket_name = record_event["s3"]["bucket"]["name"]
key = record_event["s3"]["object"]["key"]

(sinks) = i.from_environment()
ingester = i(sinks=sinks, bucket_name=bucket_name, key=key)
(sinks) = Ingester.from_environment()
ingester = Ingester(sinks=sinks, bucket_name=bucket_name, key=key)
ingester.run()

return "complete"

0 comments on commit 3795bf3

Please sign in to comment.