code: def delete_expired(self, expires):
          
          meta = self.model._meta
          with commit_on_success():
              self.get_all_expired(expires).update(hidden=True)
              cursor = self.connection_for_write().cursor()
              cursor.execute(
                  'DELETE FROM {0.db_table} WHERE hidden=%s'.format(meta),
                  (True, ),
              )
docs: Delete all expired taskset results.