Can we just do this one query instead? On line 342, we create the task status, then we queue the task, and then we upsert it again. I think we could get away with using this upsert alone (don't forget to add the tags to it), and do this upsert before we queue the task. That way we have half the queries, and I think it will still work nicely. Does that makes sense?