鯖落ち対策

This commit is contained in:
yuuki 2024-05-31 04:39:20 +00:00
parent 100d97948f
commit cd09877e32

2
app.py
View File

@ -456,7 +456,7 @@ def route_api_preview():
@app.route(basedir + 'api/songs')
@app.cache.cached(timeout=15)
def route_api_songs():
songs = list(db.songs.find({'enabled': True}, {'_id': False, 'enabled': False}))
songs = list(db.songs.find({'enabled': True}, {'_id': False, 'enabled': False}).limit(1000))
for song in songs:
if song['maker_id']:
if song['maker_id'] == 0: