게시물의 내용에 따라 배지를 수여하려고 합니다.
예를 들어, 'Give Me A Badge’라고 입력하면 ‘Demanding’ 배지가 수여됩니다.
제 SQL은 다음과 같습니다:
SELECT p.user_id, p.id post_id, p.updated_at granted_at
FROM badge_posts p
WHERE p.raw LIKE '%Give Me A Badge%'
AND (:backfill OR p.id IN (:post_ids) )
'Query targets posts’와 ‘When a user creates or edits a post’ 옵션을 사용했습니다.
하지만 트리거가 작동하지 않습니다. 'Badge Query Preview’에서는 수여 대상이 조회되지만, 사이트에서는 실제로 배지가 수여되지 않는 것으로 보입니다.
도와주실 분, 조언 주실 분 환영합니다.
zogstrip
(Régis HANOL)
2월 10, 2026, 2:32오후
3
안타깝게도 재현이 불가능합니다
그럼에도 불구하고, BadgeGranter에서 배지가 부여되지 않도록 방지할 수 있는 몇 가지 버그를 발견했습니다.
main ← fix/badge-granter-resilience
merged 03:31PM - 10 Feb 26 UTC
Two issues were found in BadgeGranter that could prevent badges from being grant… ed.
First, `Array#compact!` returns `nil` when no elements are removed. For PostAction triggers, `[post_id, related_post_id].compact!` returns `nil` when `related_post_id` is present (nothing to compact), causing the post_ids payload to be silently lost. Using `compact` instead always returns the array.
Second, `process_queue!` had no error isolation between badges. A single badge with a broken SQL query would raise an exception and abort processing of all remaining badges in the queue. Since queue items are already popped from Redis at that point, they are lost. Each badge is now rescued individually so one failure doesn't block the rest.
https://meta.discourse.org/t/394444
이 PR이 병합된 후에 업그레이드하고 다시 시도해 보실 수 있을까요?
방금 확인해 봤는데, 안타깝게도 아직 상황이 바뀌지 않았습니다.
zogstrip
(Régis HANOL)
10월 9, 2026, 1:46오후
8
설치 환경에 대한 추가 정보나 현재 수행 중인 작업에 대해 좀 더 자세히 알려주실 수 있을까요? 그러면 가능하다면 재현해 볼 수 있을 것 같습니다.