Putting the concurrent artifact search code in a single function.