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

API for configuring drivers #29

Closed
tanner0101 opened this issue Jun 21, 2019 · 5 comments · Fixed by #30
Closed

API for configuring drivers #29

tanner0101 opened this issue Jun 21, 2019 · 5 comments · Fixed by #30
Labels
enhancement New feature or request

Comments

@tanner0101
Copy link
Member

There's a bit of manual work currently required to get a valid JobsPersistanceLayer. We should provide some convenience APIs for this like FluentKit does.

Each driver can extend those convenience APIs with functions for supplying the required credentials.

@tanner0101 tanner0101 added the enhancement New feature or request label Jun 21, 2019
@tanner0101 tanner0101 changed the title API for configuring driver API for configuring drivers Jun 21, 2019
@tanner0101
Copy link
Member Author

Perhaps we could utilize JobsConfiguration, something like this would be nice:

s.extend(JobsConfiguration.self) { configuration, container in
    let job = try ExecutorJob(container)
    configuration.add(job)
    configuration.configureRedis(hostname: ..., port: ...)
}

@jdmcd
Copy link
Member

jdmcd commented Jun 21, 2019

But with that wouldn't the main jobs package have to know that Redis exists?

@tanner0101
Copy link
Member Author

@mcdappdev no, JobsConfiguration would hold just a JobsPersistanceLayer, then JobsRedisDriver would extend JobsConfiguration to add that method

@jdmcd
Copy link
Member

jdmcd commented Jun 21, 2019

Ahh I see. That could work nicely! Let's plan on doing that.

@tanner0101
Copy link
Member Author

We need to make sure that we use the provider (or other means) to properly cleanup any connection pools that we create

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants