def test_signal(sender=None, task_id=None, task=None, args=None, kwargs=None, **kwds): if sender == 'h1ds.tasks.populate_tree_success': #TODO should be able to put this in connect - but not working? from h1ds.models import Device from h1ds_summary.db import SummaryTable device_slug, shot_number, tree = args[0] # TODO: should this be a celery task? device = Device(slug=device_slug) db = SummaryTable(device) db.add_or_update_shot(shot_number)