@@ -45,10 +45,9 @@ def parser(self) -> argparse.ArgumentParser:
4545 required = False ,
4646 )
4747 consume_command .add_argument (
48- "--delete-on-failure " ,
49- help = "Delete the data if archiving fails" ,
48+ "--keep-failed " ,
49+ help = "Don't delete the data if consuming fails" ,
5050 action = "store_true" ,
51- default = True ,
5251 )
5352
5453 archive_command = subparsers .add_parser (
@@ -70,10 +69,9 @@ def parser(self) -> argparse.ArgumentParser:
7069 required = True ,
7170 )
7271 archive_command .add_argument (
73- "--delete-on-failure " ,
74- help = "Delete the data if archiving fails" ,
72+ "--keep-failed " ,
73+ help = "Don't delete the data if archiving fails" ,
7574 action = "store_true" ,
76- default = True ,
7775 )
7876
7977 info_command = subparsers .add_parser ("info" , help = "Show model repository info" )
@@ -108,7 +106,7 @@ def run(self) -> int:
108106 for service in service_result
109107 for consume_result in service .consume (
110108 period = args .init_time ,
111- delete_on_failure = args .delete_on_failure ,
109+ delete_on_failure = not args .keep_failed ,
112110 )
113111 )
114112 if isinstance (result , Failure ):
@@ -126,7 +124,7 @@ def run(self) -> int:
126124 for service in service_result
127125 for consume_result in service .consume (
128126 period = period ,
129- delete_on_failure = args .delete_on_failure ,
127+ delete_on_failure = not args .keep_failed ,
130128 )
131129 )
132130 if isinstance (result , Failure ):
0 commit comments