Compare commits

...

2 commits

Author SHA1 Message Date
87ca707851 Increase the waitress threads number to 16 2025-02-06 14:29:51 +00:00
9d44a0a2ca Change the time command string 2025-02-06 14:17:27 +00:00
3 changed files with 5 additions and 5 deletions

View file

@ -19,4 +19,4 @@ COPY . .
EXPOSE 8080
CMD [ "waitress-serve", "--port=8080", "--call", "api:create_app"]
CMD [ "waitress-serve", "--port=8080", "--threads=16", "--call", "api:create_app"]

View file

@ -229,7 +229,7 @@ scheduler.get_job('core_api_sync').modify(next_run_time=datetime.now())
# Start the scheduler
scheduler.start()
## Flask
### Flask ###
# Frontend
@app.route('/', methods=['GET'])
def root_route():
@ -246,7 +246,7 @@ def root_route():
thumbnails = [file for file in os.listdir(f'{rec_path}/thumb/') if file.endswith('.png')]
return render_template('index.html', now=datetime.utcnow(), video_files=video_files, thumbnails=sorted_thumbnails)
# API
# JSON Data
@app.route('/playhead', methods=['GET'])
def playhead_route():
global playhead

View file

@ -60,9 +60,9 @@ async def hello_error(ctx, error):
if isinstance(error, CheckFailure):
await ctx.channel.send('do I know you?')
@bot.command(name='time', help='Show current time')
@bot.command(name='time', help='Show current time in UTC')
async def time(ctx):
await ctx.channel.send(f'The time is: `{datetime.now(timezone.utc)} UTC`')
await ctx.channel.send(f'The Coordinated Universal Time is `{datetime.now(timezone.utc)}`')
@bot.command(name='epg', help='Lists scheduled streams')
async def epg(ctx):