def test_async_to_marker(self, invalid_group_id): from furious.marker_tree.marker import Marker from furious.async import Async task = Async(target=dir) task.id = "1" marker = Marker.from_async(task) self.assertIsNone(marker.group_id)
def handle_async_done(async): """ Args: an Async instance This will mark and async as done and will begin the process to see if all the other asyncs in it's context, if it has one, are done """ if async.id: marker = Marker.get(async.id) if not marker: marker = Marker.from_async(async) marker.done = True marker.result = async.result marker.update_done(persist_first=True)