Not later than 10 days after (1)making demand upon or application to the treasurer or other officer of the city to sell property for the delinquency or (2)commencing an action or proceeding in any court to foreclose the lien of the special assessment or bond, the lienholder shall record with the county recorder a notice of pendency of the sale or foreclosure.