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

Refactor the exception code in entrypoints.py #44

Closed
jimboid opened this issue Jun 5, 2017 · 2 comments
Closed

Refactor the exception code in entrypoints.py #44

jimboid opened this issue Jun 5, 2017 · 2 comments
Assignees
Milestone

Comments

@jimboid
Copy link
Member

jimboid commented Jun 5, 2017

There is code and unit test duplication for the longbow() and recovery() methods. The try except blocks in the longbow and recovery methods that handle the user interrupt are identical. This code should be moved up to the launcher() scope where it will feature just once.

Doing this will require refactoring the code slightly so that the jobs structure is in the scope of launcher, it will need passing in to longbow() as part of parameters.

@jimboid jimboid added this to the v1.5.1 milestone Jun 5, 2017
@jimboid jimboid self-assigned this Jun 5, 2017
@jimboid
Copy link
Member Author

jimboid commented Jun 13, 2017

This might not be a good idea in the end. Some library users will use the top level functions longbow() and recovery() but not the application launcher method. So it is probably better, rather than moving the exception code up to launcher() but to have a private exceptions handler method common to both longbow() and recovery() this will make testing much simpler.

@jimboid jimboid modified the milestones: v1.5.1, v1.5.2 Oct 10, 2017
@jimboid jimboid closed this as completed May 9, 2018
@jimboid
Copy link
Member Author

jimboid commented Jul 13, 2018

Completed as part of issue #61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant