Skip to content

Commit

Permalink
Merge pull request #300 from TogetherCrew/feat/analyzer-helpers-telegram
Browse files Browse the repository at this point in the history
fix: updated to use telegram config!
  • Loading branch information
amindadgar authored Oct 7, 2024
2 parents 6549a9c + 6f87d61 commit 27d751b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 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,11 +200,10 @@ 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()

Expand All @@ -214,6 +214,8 @@ def analyze_telegram(platform_processed: dict[str, str | bool]) -> None:
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 27d751b

Please sign in to comment.