All moneys received by the sheriff under the provisions of this chapter shall be paid to the clerk of the court that issued the writ, to be held to be applied to any judgment that may be recovered in the action, and all other attached property shall be retained by the sheriff to be applied to any judgment that may be recovered in the action.