feat(media): allow disabling media handling via envvar #1199
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Important
Add
LANGFUSE_MEDIA_UPLOAD_ENABLEDto control media handling in Langfuse SDK, affecting initialization and processing inresource_manager.pyandmedia_manager.py.LANGFUSE_MEDIA_UPLOAD_ENABLEDtoenvironment_variables.pyto control media detection and upload.resource_manager.py, initialize_media_upload_enabledbased onLANGFUSE_MEDIA_UPLOAD_ENABLED._initialize_instance()based on_media_upload_enabled.media_manager.py, check_enabledbefore processing media in_find_and_process_media()._enabledinMediaManagerbased onLANGFUSE_MEDIA_UPLOAD_ENABLED.This description was created by
for 1888ac1. You can customize this summary. It will automatically update as commits are pushed.
Greptile Summary
Disclaimer: Experimental PR review
Added new environment variable
LANGFUSE_MEDIA_UPLOAD_ENABLEDto control media handling functionality in the Python SDK, with a default value of 'True'.LANGFUSE_MEDIA_UPLOAD_ENABLEDenvironment variable definition in/langfuse/_client/environment_variables.py/langfuse/_task_manager/media_manager.pyto skip processing when disabled/langfuse/_client/resource_manager.pyto conditionally start media upload consumer threads based on the setting