-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
mix.exs
Outdated
|
||
# Test dependency | ||
{:bypass, "~> 2.1", only: :test}, | ||
{:httpoison, "~> 2.0", only: :test}, |
There was a problem hiding this comment.
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
{:httpoison, "~> 2.0", only: :test}, |
There was a problem hiding this comment.
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.
def_options aws_config: [ | ||
spec: Keyword.t(), |
There was a problem hiding this comment.
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.
Co-authored-by: Karol Konkol <56369082+Karolk99@users.noreply.github.com>
Co-authored-by: Karol Konkol <56369082+Karolk99@users.noreply.github.com>
lib/s3/s3_source.ex
Outdated
|
||
@impl true | ||
def handle_init(_context, opts) do | ||
state = %{ |
There was a problem hiding this comment.
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
|> Task.async_stream( | ||
&download_chunk(state, &1), | ||
max_concurrency: Keyword.get(state.opts, :max_concurrency, 8), | ||
timeout: Keyword.get(state.opts, :timeout, 60_000) |
There was a problem hiding this comment.
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
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>
No description provided.