Fix POST /story/end API endpoint

This commit is contained in:
vfbd 2022-09-05 14:37:39 -04:00
parent f38034bd2c
commit f66ffa09a2

View File

@ -4059,9 +4059,9 @@ def check_for_backend_compilation():
break break
vars.checking = False vars.checking = False
def actionsubmit(data, actionmode=0, force_submit=False, force_prompt_gen=False, disable_recentrng=False, no_generate=False): def actionsubmit(data, actionmode=0, force_submit=False, force_prompt_gen=False, disable_recentrng=False, no_generate=False, ignore_aibusy=False):
# Ignore new submissions if the AI is currently busy # Ignore new submissions if the AI is currently busy
if(vars.aibusy): if(not ignore_aibusy and vars.aibusy):
return return
while(True): while(True):
@ -7755,7 +7755,7 @@ def post_story_end(body: SubmissionInputSchema):
numseqs = vars.numseqs numseqs = vars.numseqs
vars.numseqs = 1 vars.numseqs = 1
try: try:
actionsubmit(body.prompt, force_submit=True, no_generate=True) actionsubmit(body.prompt, force_submit=True, no_generate=True, ignore_aibusy=True)
finally: finally:
vars.disable_set_aibusy = disable_set_aibusy vars.disable_set_aibusy = disable_set_aibusy
vars.standalone = _standalone vars.standalone = _standalone