Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: updated to use telegram config! #300

Merged
merged 3 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
amindadgar marked this conversation as resolved.
Show resolved Hide resolved

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,
amindadgar marked this conversation as resolved.
Show resolved Hide resolved
)

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
amindadgar marked this conversation as resolved.
Show resolved Hide resolved
Loading