File tree Expand file tree Collapse file tree 2 files changed +33
-25
lines changed
Expand file tree Collapse file tree 2 files changed +33
-25
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,11 @@ async def recover(
119119 :param cursor: A database cursor which can be used to populate the
120120 database with recovered state.
121121 """
122- if self ._state .stage not in {RecoveryStages .inactive , RecoveryStages .download_failed , RecoveryStages .import_failed }:
122+ if self ._state .stage not in {
123+ RecoveryStages .inactive ,
124+ RecoveryStages .download_failed ,
125+ RecoveryStages .import_failed ,
126+ }:
123127 return
124128
125129 self ._set_state (RecoveryState (stage = RecoveryStages .started ))
Original file line number Diff line number Diff line change @@ -1056,18 +1056,20 @@ async def recover():
10561056 lambda messages : list (
10571057 loads (args [0 ]) for (args , kwargs ) in messages
10581058 ),
1059- Equals ([
1060- {
1061- "stage" : "started" ,
1062- "failure-reason" : None ,
1063- },
1064- # "our" downloader (above) doesn't set any downloading etc
1065- # state-updates
1066- {
1067- "stage" : "download_failed" ,
1068- "failure-reason" : "downloader fails" ,
1069- },
1070- ]),
1059+ Equals (
1060+ [
1061+ {
1062+ "stage" : "started" ,
1063+ "failure-reason" : None ,
1064+ },
1065+ # "our" downloader (above) doesn't set any downloading etc
1066+ # state-updates
1067+ {
1068+ "stage" : "download_failed" ,
1069+ "failure-reason" : "downloader fails" ,
1070+ },
1071+ ]
1072+ ),
10711073 )
10721074 ),
10731075 )
@@ -1079,18 +1081,20 @@ async def recover():
10791081 lambda messages : list (
10801082 loads (args [0 ]) for (args , kwargs ) in messages
10811083 ),
1082- Equals ([
1083- {
1084- "stage" : "started" ,
1085- "failure-reason" : None ,
1086- },
1087- # "our" downloader (above) doesn't set any downloading etc
1088- # state-updates
1089- {
1090- "stage" : "succeeded" ,
1091- "failure-reason" : None ,
1092- },
1093- ]),
1084+ Equals (
1085+ [
1086+ {
1087+ "stage" : "started" ,
1088+ "failure-reason" : None ,
1089+ },
1090+ # "our" downloader (above) doesn't set any downloading etc
1091+ # state-updates
1092+ {
1093+ "stage" : "succeeded" ,
1094+ "failure-reason" : None ,
1095+ },
1096+ ]
1097+ ),
10941098 )
10951099 ),
10961100 )
You can’t perform that action at this time.
0 commit comments