-
Notifications
You must be signed in to change notification settings - Fork 39
insert_tasks_ignore_duplicates - New _insert_tasks_ignore_duplicate_name... #162
insert_tasks_ignore_duplicates - New _insert_tasks_ignore_duplicate_name... #162
Conversation
…ames to gracefully handle DuplicateTaskNameError exceptions raised by inserts.
I think it's fine passing in the method like this. One thing we may want to do though is move this new method out of the contexts file and create a module for task insertion handling. That way we can give users a module with some different choices for handling the task insertion without having to dig through Furious internals. |
@beaulyddon-wf - Agreed - it doesn't feel right to be using an |
yeah. or |
…le in extra package.
@beaulyddon-wf - Moved new function to furious/extras/insert_task_handlers.py |
Cool. I like that. +1 |
+1 |
@@ -0,0 +1,91 @@ | |||
from mock import Mock | |||
from mock import patch |
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.
in python 2.7 mock isn't part of the standard library.
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.
Alright - I'll move down and group with google.
+1 |
1 similar comment
+1 |
…task_handlers.py, and correct extra/missing blank lines
@macleodbroad-wf - comments addressed regarding imports and blank lines. |
+1 |
1 similar comment
+1 |
…ameError on retry of individual task. The potential exception, TaskAlreadyExistsError, is already handled by _insert_tasks.
+1 |
…ate_names insert_tasks_ignore_duplicates - New _insert_tasks_ignore_duplicate_name...
...s to gracefully handle DuplicateTaskNameError exceptions raised by inserts.
@beaulyddon-wf @tannermiller-wf @robertkluin
FYI: @erikpetersen-wf @jasonaguilon-wf @macleodbroad-wf
Right now a typical usage would be: