File tree 1 file changed +10
-7
lines changed
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,6 @@ async def start(self, ids):
58
58
if self ._import_in_progress :
59
59
raise ImportInProgress ()
60
60
61
- context = await self ._prepare_context (ids )
62
-
63
61
async def import_element (id_ , context_ ):
64
62
try :
65
63
element = await self ._get (id_ , context_ )
@@ -83,12 +81,17 @@ async def import_elements(ids_, context_):
83
81
finally :
84
82
self ._import_in_progress = False
85
83
86
- self ._task_manager .create_task (
87
- import_elements (ids , context ),
88
- "{} import" .format (self ._name ),
89
- handle_exceptions = False
90
- )
91
84
self ._import_in_progress = True
85
+ try :
86
+ context = await self ._prepare_context (ids )
87
+ self ._task_manager .create_task (
88
+ import_elements (ids , context ),
89
+ "{} import" .format (self ._name ),
90
+ handle_exceptions = False
91
+ )
92
+ except :
93
+ self ._import_in_progress = False
94
+ raise
92
95
93
96
94
97
class Plugin :
You can’t perform that action at this time.
0 commit comments