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

Function ddb_cleanup

coreplugins/dronedb/api_views.py:275–292  ·  view source on GitHub ↗
(sender, task_id, **kwargs)

Source from the content-addressed store, hash-verified

273@receiver(plugin_signals.task_removed, dispatch_uid="ddb_on_task_removed")
274@receiver(plugin_signals.task_completed, dispatch_uid="ddb_on_task_completed")
275def ddb_cleanup(sender, task_id, **kwargs):
276 p = get_current_plugin(only_active=True)
277 if p is None:
278 return
279
280 from app.plugins import logger
281
282 # When a task is removed, simply remove clutter
283 # When a task is re-processed, make sure we can re-share it if we shared a task previously
284
285 logger.info("Cleaning up DroneDB datastore for task {}".format(str(task_id)))
286
287 datastore = p.get_global_data_store()
288 status_key = get_status_key(task_id)
289
290 logger.info("Info task {0} ({1})".format(str(task_id), status_key))
291
292 datastore.del_key(status_key)
293
294
295class StatusTaskView(TaskView):

Callers

nothing calls this directly

Calls 5

get_current_pluginFunction · 0.90
get_status_keyFunction · 0.85
get_global_data_storeMethod · 0.80
del_keyMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected