|
|
@ -32,7 +32,7 @@ def main(
|
|
|
|
output_dir,
|
|
|
|
output_dir,
|
|
|
|
host='condor.live', user='necrobot-read', password='necrobot-read', database='condor_xii',
|
|
|
|
host='condor.live', user='necrobot-read', password='necrobot-read', database='condor_xii',
|
|
|
|
base_dir='/srv/wubloader', start_range='0,10', non_interactive=False, restrict_league=None,
|
|
|
|
base_dir='/srv/wubloader', start_range='0,10', non_interactive=False, restrict_league=None,
|
|
|
|
only_match_id=0,
|
|
|
|
only_match_id=0, best_effort_no_segments=False,
|
|
|
|
):
|
|
|
|
):
|
|
|
|
logging.basicConfig(level=logging.INFO)
|
|
|
|
logging.basicConfig(level=logging.INFO)
|
|
|
|
start_range = map(int, start_range.split(","))
|
|
|
|
start_range = map(int, start_range.split(","))
|
|
|
@ -77,6 +77,7 @@ def main(
|
|
|
|
"output_range": (-5, 30),
|
|
|
|
"output_range": (-5, 30),
|
|
|
|
"time_offset": 0,
|
|
|
|
"time_offset": 0,
|
|
|
|
} if name.startswith("caw-") or league == "gru" else {}
|
|
|
|
} if name.startswith("caw-") or league == "gru" else {}
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
cut_sync_race.cut_race(
|
|
|
|
cut_sync_race.cut_race(
|
|
|
|
base_dir, output_temp, temp_dir, stream, start, duration,
|
|
|
|
base_dir, output_temp, temp_dir, stream, start, duration,
|
|
|
@ -84,7 +85,15 @@ def main(
|
|
|
|
**no_sync_kwargs
|
|
|
|
**no_sync_kwargs
|
|
|
|
)
|
|
|
|
)
|
|
|
|
except cut_sync_race.NoSegments as e:
|
|
|
|
except cut_sync_race.NoSegments as e:
|
|
|
|
logging.warning(e)
|
|
|
|
if not best_effort_no_segments:
|
|
|
|
|
|
|
|
raise
|
|
|
|
|
|
|
|
logging.warning("{}\nTrying to cut as much of the race as we have, from -5 to +30".format(e))
|
|
|
|
|
|
|
|
cut_sync_race.cut_race(
|
|
|
|
|
|
|
|
base_dir, output_temp, temp_dir, stream, start, duration,
|
|
|
|
|
|
|
|
non_interactive=True, output_range=(-5, 30), time_offset=0,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
except cut_sync_race.NoSegments as e:
|
|
|
|
|
|
|
|
logging.error(e)
|
|
|
|
except Exception as e:
|
|
|
|
except Exception as e:
|
|
|
|
logging.exception("Failed to cut {}".format(output_path), exc_info=True)
|
|
|
|
logging.exception("Failed to cut {}".format(output_path), exc_info=True)
|
|
|
|
if not non_interactive:
|
|
|
|
if not non_interactive:
|
|
|
|