(sender, task_id, **kwargs)
| 273 | @receiver(plugin_signals.task_removed, dispatch_uid="ddb_on_task_removed") |
| 274 | @receiver(plugin_signals.task_completed, dispatch_uid="ddb_on_task_completed") |
| 275 | def 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 | |
| 295 | class StatusTaskView(TaskView): |
nothing calls this directly
no test coverage detected