Compare commits
2 commits
cc224901e7
...
87ca707851
Author | SHA1 | Date | |
---|---|---|---|
87ca707851 | |||
9d44a0a2ca |
3 changed files with 5 additions and 5 deletions
|
@ -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"]
|
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue