fix: 모든 토너먼트 writer의 source revision을 원자화
API store뿐 아니라 월 자동 개막과 runtime clock shift도 공통 Lua writer를 사용한다. 프로필 초기화 시 revision key도 함께 제거한다.
This commit is contained in:
@@ -171,6 +171,7 @@ export const buildTournamentRuntimeKeys = (profileName: string): string[] => [
|
||||
`sammo:${profileName}:tournament:participants`,
|
||||
`sammo:${profileName}:tournament:matches`,
|
||||
`sammo:${profileName}:tournament:betting`,
|
||||
`sammo:${profileName}:tournament:source-revision`,
|
||||
];
|
||||
|
||||
export const clearTournamentRuntimeKeys = async (
|
||||
|
||||
@@ -12,6 +12,7 @@ describe('tournament reset state', () => {
|
||||
'sammo:che:1010:tournament:participants',
|
||||
'sammo:che:1010:tournament:matches',
|
||||
'sammo:che:1010:tournament:betting',
|
||||
'sammo:che:1010:tournament:source-revision',
|
||||
]);
|
||||
expect(buildTournamentRuntimeKeys('hwe:915')).not.toContain('sammo:che:1010:tournament:state');
|
||||
});
|
||||
@@ -28,7 +29,7 @@ describe('tournament reset state', () => {
|
||||
'che:1010'
|
||||
);
|
||||
|
||||
expect(deleted).toBe(4);
|
||||
expect(deleted).toBe(5);
|
||||
expect(calls).toEqual([buildTournamentRuntimeKeys('che:1010')]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user