If any person—
any officer of the court, with or without the assistance of any other person, may, by order of the judge, take the offender into custody and detain him until the rising of the court, and the judge may, if he thinks fit,—
A judge of the county court may at any time revoke an order committing a person to prison under this section and, if he is already in custody, order his discharge.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .