Merge pull request #203 from VE-FORBRYDERNE/patch

Fix POST /story/end API endpoint
This commit is contained in:
henk717 2022-09-05 22:27:54 +02:00 committed by GitHub
commit 3236068c84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4081,9 +4081,9 @@ def check_for_backend_compilation():
break
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
if(vars.aibusy):
if(not ignore_aibusy and vars.aibusy):
return
while(True):
@ -7779,7 +7779,7 @@ def post_story_end(body: SubmissionInputSchema):
numseqs = vars.numseqs
vars.numseqs = 1
try:
actionsubmit(body.prompt, force_submit=True, no_generate=True)
actionsubmit(body.prompt, force_submit=True, no_generate=True, ignore_aibusy=True)
finally:
vars.disable_set_aibusy = disable_set_aibusy
vars.standalone = _standalone