@@ -132,7 +132,7 @@ def split_key(entry):
132132 return None , None , None , None
133133
134134
135- def process_prod_tag (prod_tag , year = "2025" , ccdb_url = None , username = None ):
135+ def process_prod_tag (prod_tag , year = "2025" , ccdb_url = None , username = None , overwrite = False ):
136136 base_path = f"/alice/sim/{ year } /{ prod_tag } "
137137
138138 workflow_files = alien_find (base_path , "workflow.json" )
@@ -184,7 +184,7 @@ def process_prod_tag(prod_tag, year="2025", ccdb_url=None, username=None):
184184 if info_min .OrbitsPerTF != info_max .OrbitsPerTF :
185185 print (f"❌ OrbitsPerTF mismatch for run { run_number } " )
186186
187- publish_MCProdInfo (info_min , username = username , ccdb_url = ccdb_url )
187+ publish_MCProdInfo (info_min , username = username , ccdb_url = ccdb_url , force_overwrite = overwrite )
188188 print (info_min )
189189
190190
@@ -196,9 +196,10 @@ def main():
196196 parser .add_argument ("--ccdb" , required = False , default = "https://alice-ccdb.cern.ch" , help = "CCDB server URL" )
197197 parser .add_argument ("--username" , required = False , help = "GRID username (needs appropriate AliEn token initialized)" )
198198 parser .add_argument ("--year" , default = "2025" , help = "Production year (default: 2025)" )
199+ parser .add_argument ("--overwrite" , action = "store_true" , help = "Overwrite existing entries" )
199200 args = parser .parse_args ()
200201
201- process_prod_tag (args .prod_tag , year = args .year , ccdb_url = args .ccdb , username = args .username )
202+ process_prod_tag (args .prod_tag , year = args .year , ccdb_url = args .ccdb , username = args .username , overwrite = args . overwrite )
202203
203204if __name__ == "__main__" :
204205 main ()
0 commit comments