Daryl Fung commited on
Commit
6f87188
1 Parent(s): fb74953

remove flush as it is unecessary

Browse files
Files changed (1) hide show
  1. db/make_audio.py +0 -3
db/make_audio.py CHANGED
@@ -42,7 +42,6 @@ async def make_audio():
42
  # remove the response to generate the audio for if it already exists in the audio database
43
  if check_if_exist(text):
44
  response.delete(expr=f"id in {str([res[0]['id']])}")
45
- response.flush()
46
  continue
47
 
48
  # generate audio
@@ -63,11 +62,9 @@ async def make_audio():
63
  if current_iteration % batch_size == 0:
64
  # insert the audio
65
  audio_response.insert(list(zip(*data)))
66
- audio_response.flush()
67
 
68
  # delete text to generate audio
69
  response.delete(expr=f"id in {str(ids_to_delete)}")
70
- response.flush()
71
  ids_to_delete = []
72
 
73
  response_iterator.close()
 
42
  # remove the response to generate the audio for if it already exists in the audio database
43
  if check_if_exist(text):
44
  response.delete(expr=f"id in {str([res[0]['id']])}")
 
45
  continue
46
 
47
  # generate audio
 
62
  if current_iteration % batch_size == 0:
63
  # insert the audio
64
  audio_response.insert(list(zip(*data)))
 
65
 
66
  # delete text to generate audio
67
  response.delete(expr=f"id in {str(ids_to_delete)}")
 
68
  ids_to_delete = []
69
 
70
  response_iterator.close()