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 better error handling #1

Closed
mjhea0 opened this issue Oct 6, 2017 · 2 comments
Closed

add better error handling #1

mjhea0 opened this issue Oct 6, 2017 · 2 comments

Comments

@mjhea0
Copy link
Owner

mjhea0 commented Oct 6, 2017

Add error handlers on both the client in the AJAX requests as well as on the server for failed jobs.

@ibrahimsharaf
Copy link

Hi @mjhea0, how can I start on this one?

@mjhea0
Copy link
Owner Author

mjhea0 commented Oct 9, 2017

@ibrahimsharaf try thinking of some edge cases, and then add tests. For example, what would happen if the task_type is a string - like hello - rather than an integer? Write a test for this and then add a try/except to the code to get the test to pass.

def create_task(task_type):
    time.sleep(int(task_type) * 10)
    return True

@mjhea0 mjhea0 closed this as completed Apr 1, 2018
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

2 participants