Skip to content

Commit

Permalink
backport pit crew fixes (#500)
Browse files Browse the repository at this point in the history
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: methylDragon <[email protected]>
Co-authored-by: methylDragon <[email protected]>
  • Loading branch information
koonpeng and methylDragon authored Jun 13, 2024
1 parent f30c2fd commit 35c45c4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions rmf_building_map_tools/pit_crew/pit_crew.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ def build_and_update_cache(cache_file_path=None, write_to_cache=True,
while status == 200 and not break_flag:
logger.info("Fetching page: %d" % page)

resp = requests.get("%s?page=%d" % (url_base, page))
resp = requests.get("%s?page=%d&per_page=100" % (url_base, page))
status = resp.status_code
page += 1

Expand All @@ -854,7 +854,12 @@ def build_and_update_cache(cache_file_path=None, write_to_cache=True,
author_name = model.get("owner", "")

# If a cached model was found, halt
if (model_name, author_name) in old_cache['model_cache']:
if (
(model_name, author_name) in old_cache['model_cache']
# this particular model is duplicated in fuel,
# causing the cache to break early
and model_name != "ur5_rg2" and author_name != "anni"
):
logger.info("Cached model found! "
"Halting Fuel traversal...")
break_flag = True
Expand Down

0 comments on commit 35c45c4

Please sign in to comment.