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

Add Membrane.AWS.S3.Source #1

Merged
merged 17 commits into from
Mar 4, 2024
Merged

Add Membrane.AWS.S3.Source #1

merged 17 commits into from
Mar 4, 2024

Conversation

Rados13
Copy link
Contributor

@Rados13 Rados13 commented Feb 28, 2024

No description provided.

lib/s3/s3_source.ex Outdated Show resolved Hide resolved
mix.exs Outdated Show resolved Hide resolved
mix.exs Outdated

# Test dependency
{:bypass, "~> 2.1", only: :test},
{:httpoison, "~> 2.0", only: :test},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also never used

Suggested change
{:httpoison, "~> 2.0", only: :test},

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://hexdocs.pm/ex_aws/ExAws.Request.HttpClient.html. I think we should add hackney to mix dependencies. If a user wants to change the HTTP library he can do it itself.

Comment on lines +9 to +10
def_options aws_config: [
spec: Keyword.t(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any example in Readme or type for aws_config. I think that it would be nice to know what keywords you have to pass to access a s3 bucket.

Rados13 and others added 6 commits February 29, 2024 14:23
Co-authored-by: Karol Konkol <56369082+Karolk99@users.noreply.github.com>
Co-authored-by: Karol Konkol <56369082+Karolk99@users.noreply.github.com>
@Rados13 Rados13 requested a review from Karolk99 March 1, 2024 07:20
mix.exs Outdated Show resolved Hide resolved

@impl true
def handle_init(_context, opts) do
state = %{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Map.merge would look better

lib/s3/s3_source.ex Outdated Show resolved Hide resolved
|> Task.async_stream(
&download_chunk(state, &1),
max_concurrency: Keyword.get(state.opts, :max_concurrency, 8),
timeout: Keyword.get(state.opts, :timeout, 60_000)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move the timeout value to the attribute variable

lib/s3/s3_source.ex Outdated Show resolved Hide resolved
Rados13 and others added 4 commits March 4, 2024 10:05
Co-authored-by: Karol Konkol <56369082+Karolk99@users.noreply.github.com>
Co-authored-by: Karol Konkol <56369082+Karolk99@users.noreply.github.com>
Co-authored-by: Karol Konkol <56369082+Karolk99@users.noreply.github.com>
@Rados13 Rados13 merged commit 41b59a7 into master Mar 4, 2024
3 checks passed
@Rados13 Rados13 deleted the s3_source branch March 4, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants