def raise_if_reindex_in_progress(site):
 already_reindexing = Reindexing.objects._is_reindexing(site)
 if (already_reindexing and ('FORCE_INDEXING' not in os.environ)):
  raise CommandError('Indexation already occurring. Add a FORCE_INDEXING variable in the environ to force it')

def raise_if_reindex_in_progress ( site ) : already_reindexing = Reindexing . objects . _is_reindexing ( site ) if ( already_reindexing and ( 'FORCE_INDEXING' not in os . environ ) ) : raise CommandError ( 'Indexation already occurring. Add a FORCE_INDEXING variable in the environ to force it' )
checks if the database indexation flag is on for the given site .