Skip to content

Commit

Permalink
proper version, threshold to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rlellep committed Dec 13, 2022
1 parent 77ae628 commit ebb021c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 0 additions & 2 deletions app/api/routers.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ async def create_job(response: Response,
job_info = await database.create_job(session, job_id, filename, speaker, speed)
await publish(job_id, file_extension="epub")

response.headers['Content-Disposition'] = 'attachment; filename="api.json"'
return job_info


Expand All @@ -84,7 +83,6 @@ async def create_job(response: Response,
await database.update_job(session, job_id, State.QUEUED)
await publish(job_id, file_extension="epub")

response.headers['Content-Disposition'] = 'attachment; filename="api.json"'
return job_info


Expand Down
6 changes: 4 additions & 2 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@

app = FastAPI(
title="epub-api",
version='2.1.0',#api_settings.version,
description="A service that performs text-to-speech on uploaded epub audio book."
version=api_settings.version if api_settings.version else "dev",
description=f'A service that performs text-to-speech on uploaded epub audio book.\n\n\
A job without updates expires after {int(api_settings.expiration_threshold/(60*60*24))} days.\n\
Job is removed after being expired for {int(api_settings.removal_threshold/(60*60*24))} days.'
)

app.add_middleware(
Expand Down
2 changes: 1 addition & 1 deletion app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


class APISettings(BaseSettings):
version: str = '2.1.0'
version: str = '1.0.4'
username: str = 'guest'
password: str = 'guest'
cleanup_interval: int = 600 # 10 minutes - run db & file cleanup
Expand Down

0 comments on commit ebb021c

Please sign in to comment.