fix: 캘린더 모달 중복 카드 문제 및 삭제 권한 개선
- monthly_worker_status 조회 시 GROUP BY로 중복 데이터 합산 - 작업보고서 삭제 권한을 그룹장 이상으로 제한 (admin, system, group_leader) - 중복 데이터 정리를 위한 마이그레이션 SQL 추가 (009_fix_duplicate_monthly_status.sql) - synology_deployment 버전에도 동일 수정 적용
This commit is contained in:
@@ -20,23 +20,19 @@ const initRedis = async () => {
|
||||
const redis = require('redis');
|
||||
|
||||
redisClient = redis.createClient({
|
||||
host: process.env.REDIS_HOST || 'localhost',
|
||||
port: process.env.REDIS_PORT || 6379,
|
||||
socket: {
|
||||
host: process.env.REDIS_HOST || 'localhost',
|
||||
port: process.env.REDIS_PORT || 6379,
|
||||
reconnectStrategy: (retries) => {
|
||||
if (retries > 10) {
|
||||
console.warn('Redis 재시도 횟수 초과. 메모리 캐시를 사용합니다.');
|
||||
return false; // Redis 연결 포기
|
||||
}
|
||||
return Math.min(retries * 100, 3000);
|
||||
}
|
||||
},
|
||||
password: process.env.REDIS_PASSWORD || undefined,
|
||||
db: process.env.REDIS_DB || 0,
|
||||
retry_strategy: (options) => {
|
||||
if (options.error && options.error.code === 'ECONNREFUSED') {
|
||||
console.warn('Redis 서버에 연결할 수 없습니다. 메모리 캐시를 사용합니다.');
|
||||
return undefined; // Redis 연결 포기
|
||||
}
|
||||
if (options.total_retry_time > 1000 * 60 * 60) {
|
||||
return new Error('Redis 재시도 시간 초과');
|
||||
}
|
||||
if (options.attempt > 10) {
|
||||
return undefined;
|
||||
}
|
||||
return Math.min(options.attempt * 100, 3000);
|
||||
}
|
||||
database: process.env.REDIS_DB || 0
|
||||
});
|
||||
|
||||
redisClient.on('error', (err) => {
|
||||
|
||||
Reference in New Issue
Block a user