Skip to content

Commit

Permalink
fix: updated to use telegram config!
Browse files Browse the repository at this point in the history
  • Loading branch information
amindadgar committed Oct 7, 2024
1 parent 1e57cf8 commit 8703847
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions dags/telegram_analyzer_etl.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from analyzer_helper.telegram.transform_raw_data import TransformRawInfo
from analyzer_helper.telegram.transform_raw_members import TransformRawMembers
from dateutil.parser import parse
from tc_analyzer_lib.schemas.platform_configs import TelegramAnalyzerConfig

with DAG(
dag_id="telegram_analyzer_etl",
Expand Down Expand Up @@ -199,21 +200,22 @@ def analyze_telegram(platform_processed: dict[str, str | bool]) -> None:

platform_data = fetcher.fetch_analyzer_parameters(platform_id)

metadata = platform_data["metadata"]
period = metadata["period"]
action = metadata["action"]
window = metadata["window"]
resources = metadata["resources"]
period = platform_data["period"]
action = platform_data["action"]
window = platform_data["window"]
resources = platform_data["resources"]

analyzer = Analyzer()

analyzer.analyze(
platform_id=platform_id,
resources=resources,
period=period,
action=action,
window=window,
recompute=recompute,
config=TelegramAnalyzerConfig(),
send_completed_message=False,
)

platform_modules = fetch_telegram_platforms()
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ redis===5.0.4
tc-wikipedia-lib==1.0.1
llama-index-readers-file==0.1.22
docx2txt==0.8
tc-analyzer-lib==1.4.10
tc-analyzer-lib==1.4.11

0 comments on commit 8703847

Please sign in to comment.