When a person has been sentenced by a district judge or a judge of the superior court to a term of imprisonment in the county jail, whether in default of payment of a fine, or costs or otherwise; such person may be compelled to work eight hours, each day of such term, in and about the county buildings, public roads, streets and grounds: PROVIDED, This section and RCW
9.92.130 shall not apply to persons committed in default of bail.