Traceback histories - #130
Merged
Merged
Conversation
Pauleuh
commented
Sep 21, 2016
Contributor
- Saving successive errors to a job in an array under the key "traceback_histories".
- This is useful in order to debug retrying jobs.
- Feature + tests included.
sylvinus
reviewed
Sep 21, 2016
sylvinus
left a comment
Contributor
There was a problem hiding this comment.
Cool PR! Minor comments
| # If we were given another config file, use it | ||
| print "hello" | ||
| print file_path | ||
| print from_args.get("config") |
| config_file = file_path | ||
| elif from_args.get("config"): | ||
| config_file = from_args.get("config") | ||
| print config_file |
| import encodings | ||
| import copy_reg | ||
| from . import context | ||
| from mrq.context import get_current_config |
Contributor
There was a problem hiding this comment.
context is imported right before, could you use context. get_current_config instead to avoid the double import?
|
|
||
| def run(self, params): | ||
|
|
||
| print get_config() |
| import json | ||
| import time | ||
| import copy | ||
| from mrq.config import get_config |
| new_history = { | ||
| "date": failure_date, | ||
| "status": status, | ||
| "exceptiontype": job_exc.__name__ |
Contributor
There was a problem hiding this comment.
saving the worker ID would be great too. (get_current_worker(), which may return None)
| "path": "tests.tasks.general.RetryOnFailed"})[0] | ||
|
|
||
| print job["traceback_history"] | ||
| assert len(job["traceback_history"]) == 2 |
Contributor
There was a problem hiding this comment.
would be great here to test the order of the tracebacks too
Contributor
|
Should we patch the dashboard in the same PR to display all the tracebacks? |
Contributor
Author
|
@sylvinus I fixed the small problems + added the front part. |
Contributor
|
Good job! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.