Skip to content

Commit ce282ed

Browse files
committed
Change some defaults
1 parent 95d47c3 commit ce282ed

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

dg_projects/learning_resources/learning_resources/assets/youtube_shorts.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
class YouTubeShortsConfig(Config):
3636
"""Configuration for YouTube video shorts processing."""
3737

38-
bucket_name: str = os.getenv("LR_VIDEO_SHORTS_BUCKET", "ol-mitlearn-app-storage-qa")
38+
bucket_name: str = os.getenv(
39+
"YOUTUBE_SHORTS_BUCKET", "ol-mitlearn-app-storage-{DAGSTER_ENV}"
40+
)
3941
s3_prefix: str = "youtube_shorts"
4042
max_workers: int = 4
4143
cached_metadata: str | None = None # JSON string of video metadata from sensor

dg_projects/learning_resources/learning_resources/sensors/youtube_shorts.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"""
77

88
import json
9-
import os
109
import time
1110
from typing import Any
1211

@@ -260,14 +259,9 @@ def create_run_requests(videos_to_process, metadata_by_video_id):
260259

261260

262261
@sensor(
263-
description=(
264-
"Sensor to monitor YouTube channels for new video shorts and cleanup "
265-
"old S3 objects"
266-
),
267-
minimum_interval_seconds=int(
268-
os.getenv("YOUTUBE_SHORTS_FREQUENCY", "86400")
269-
), # Default: once per day (86400 seconds)
270-
default_status=DefaultSensorStatus.RUNNING, # Start automatically
262+
description=("Sensor to monitor YouTube channels for new video shorts"),
263+
minimum_interval_seconds=86400,
264+
default_status=DefaultSensorStatus.STOPPED,
271265
required_resource_keys={
272266
"youtube_client",
273267
"youtube_config_provider",

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ services:
218218
GITHUB_TOKEN: ${GITHUB_TOKEN}
219219
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
220220
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
221-
LR_VIDEO_SHORTS_BUCKET: ${LR_VIDEO_SHORTS_BUCKET}
221+
YOUTUBE_SHORTS_BUCKET: ${YOUTUBE_SHORTS_BUCKET}
222222
YOUTUBE_DEVELOPER_KEY: ${YOUTUBE_DEVELOPER_KEY}
223223
volumes:
224224
- /tmp/io_manager_storage:/tmp/io_manager_storage

0 commit comments

Comments
 (0)