MCPcopy Create free account
hub / github.com/WebODM/WebODM / clear_task_assets_cache

Method clear_task_assets_cache

app/models/task.py:1656–1665  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1654 return os.path.join(settings.MEDIA_CACHE, "task_assets", str(self.id))
1655
1656 def clear_task_assets_cache(self):
1657 d = self.get_task_assets_cache()
1658 if d is None:
1659 return
1660
1661 if os.path.isdir(d):
1662 try:
1663 shutil.rmtree(d)
1664 except Exception as e:
1665 logger.warning("Cannot clear task assets cache {}: {}".format(d, str(e)))
1666
1667 def get_safe_textured_model(self, max_size_mb=150):
1668 input_glb = self.get_check_file_asset_path('textured_model.glb')

Callers 2

deleteMethod · 0.95

Calls 2

get_task_assets_cacheMethod · 0.95
formatMethod · 0.45

Tested by

no test coverage detected