def set_sync_mode(noinput=False):
 from .core.utils.redis_rq import rq_workers_are_running
 if rq_workers_are_running():
  redis_warning = '\nYou currently have RQ workers running.\n\nRunning in synchronous mode may conflict with jobs that are dispatched to your workers.\n\nIt is safer to stop any workers before using synchronous commands.\n\n'
  if noinput:
   print(('Warning: %s' % redis_warning))
  else:
   resp = input(('%sDo you wish to proceed? [Ny] ' % redis_warning))
   if (resp not in ('y', 'yes')):
    print('RQ workers running, not proceeding.')
    exit(2)
 for q in settings.RQ_QUEUES.itervalues():
  q['ASYNC'] = False

def set_sync_mode ( noinput = False ) : from . core . utils . redis_rq import rq_workers_are_running if rq_workers_are_running ( ) : redis_warning = '\nYou currently have RQ workers running.\n\nRunning in synchronous mode may conflict with jobs that are dispatched to your workers.\n\nIt is safer to stop any workers before using synchronous commands.\n\n' if noinput : print ( ( 'Warning: %s' % redis_warning ) ) else : resp = input ( ( '%sDo you wish to proceed? [Ny] ' % redis_warning ) ) if ( resp not in ( 'y' , 'yes' ) ) : print ( 'RQ workers running, not proceeding.' ) exit ( 2 ) for q in settings . RQ_QUEUES . itervalues ( ) : q [ 'ASYNC' ] = False
sets async = false on all redis worker queues .