mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2026-02-09 09:17:26 +08:00
[Enhance][Refactor] unranked score & warning log
- Add an option that can be used to forbid some illegal scores - Add brief warning logs for custom exceptions
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from .sql import Connect, Sql
|
||||
from .score import Score
|
||||
from .download import DownloadList
|
||||
|
||||
|
||||
class BaseOperation:
|
||||
@@ -53,3 +54,14 @@ class RefreshAllScoreRating(BaseOperation):
|
||||
if values:
|
||||
Sql(c).update_many('best_score', ['rating'], values, [
|
||||
'user_id', 'song_id', 'difficulty'], where_values)
|
||||
|
||||
|
||||
class RefreshSongFileCache(BaseOperation):
|
||||
'''
|
||||
刷新歌曲文件缓存,包括文件hash缓存重建、文件目录重遍历、songlist重解析
|
||||
'''
|
||||
name = 'refresh_song_file_cache'
|
||||
|
||||
def run(self):
|
||||
DownloadList.clear_all_cache()
|
||||
DownloadList.initialize_cache()
|
||||
|
||||
Reference in New Issue
Block a user