code: def ping_directories(self, request, queryset, messages=True):
          
          for directory in settings.PING_DIRECTORIES:
              pinger = DirectoryPinger(directory, queryset)
              pinger.join()
              if messages:
                  success = 0
                  for result in pinger.results:
                      if not result.get('flerror', True):
                          success += 1
                      else:
                          self.message_user(request,
                                            '%s : %s' % (directory,
                                                         result['message']))
                  if success:
                      self.message_user(
                          request,
                          _('%(directory)s directory succesfully '
                            'pinged %(success)d entries.') %
                          {'directory': directory, 'success': success})
docs: Ping web directories for selected entries.