# 비활성 사용자 자동 정리 기능이 작동하지 않음

**URL:** https://meta.discourse.org/t/auto-cleanup-of-inactive-users-is-not-working/152064
**Category:** Support
**Created:** [5월 20, 2020, 11:49오전 UTC](https://meta.discourse.org/t/auto-cleanup-of-inactive-users-is-not-working/152064 "2020-05-20T11:49:31Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![netpositive](https://avatars.discourse-cdn.com/v4/letter/n/8edcca/32.png) [@netpositive](https://meta.discourse.org/u/netpositive)
#### Post date: [5월 20, 2020, 11:49오전 UTC](https://meta.discourse.org/t/auto-cleanup-of-inactive-users-is-not-working/152064/1 "2020-05-20T11:49:31Z")

</div>

안녕하세요,

현재 비활성 상태인 사용자가 많이 있으며, 이제 이들을 삭제해야 합니다. 로그를 확인해 보았지만 의심스러운 내용은 발견되지 않았습니다.

현재 v2.4.3 버전을 사용 중이며, 설정은 기본값인 730일로 되어 있습니다.

이 문제를 수정하거나 최소한 수동으로 정리 작업을 시작하는 방법은 무엇인가요?

감사합니다!

---

<div class="post-metadata">

### Author: ![GI-Joe](https://avatars.discourse-cdn.com/v4/letter/g/3ab097/32.png) [@GI-Joe](https://meta.discourse.org/u/GI-Joe)
#### Post date: [5월 20, 2020, 11:52오전 UTC](https://meta.discourse.org/t/auto-cleanup-of-inactive-users-is-not-working/152064/2 "2020-05-20T11:52:31Z")

</div>

안녕하세요 @netpositive

비활성 사용자들의 경우 요구 사항이 충족되었나요?

이들은 신뢰 수준 0이어야 하며, 지난 730일 동안 게시글이 없어야 합니다.

우리는 비슷한 문제를 겪고 있는데, 이는 신뢰 수준 1인 비활성 사용자들 때문에 발생하는 것입니다.

---

<div class="post-metadata">

### Author: ![netpositive](https://avatars.discourse-cdn.com/v4/letter/n/8edcca/32.png) [@netpositive](https://meta.discourse.org/u/netpositive)
#### Post date: [5월 20, 2020, 12:00오후 UTC](https://meta.discourse.org/t/auto-cleanup-of-inactive-users-is-not-working/152064/3 "2020-05-20T12:00:45Z")

</div>

네, 두 가지 요건을 모두 충족하는 사용자가 있고, 그들의 계정도 여전히 존재합니다.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [5월 20, 2020, 7:17오후 UTC](https://meta.discourse.org/t/auto-cleanup-of-inactive-users-is-not-working/152064/4 "2020-05-20T19:17:07Z")

</div>

meta에서 @tshen 님과 함께 이 문제를 재현해 볼 수 있을까요?

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [5월 20, 2020, 7:43오후 UTC](https://meta.discourse.org/t/auto-cleanup-of-inactive-users-is-not-working/152064/5 "2020-05-20T19:43:35Z")

</div>

메타의 스태프 액션 로그(Sidekiq에서도 해당 정리 작업이 마지막으로 실행된 시점으로 표시됨)에 따르면 11시간 전에 비활성 사용자를 삭제한 것으로 보입니다. 따라서 문제없어 보입니다:

 ![Screen Shot 2020-05-20 at 12.29.12 PM](https://global.discourse-cdn.com/meta/original/3X/6/6/66fa48d616b4eb518889dac577882ed94caf80b6.png)

* * *

@netpositive 이 기능에 특화된 최근 커밋은 보이지 않지만, 사이트를 업데이트하는 것이 나쁠 것은 없습니다. 업데이트가 불가능하다면 작업을 수동으로 트리거해 볼 수 있습니다. 해당 작업은 `Jobs::CleanUpInactiveUsers`이며 `/sidekiq/scheduler`에서 찾을 수 있습니다.

진행 상황을 알려주시면 감사하겠습니다.

---

<div class="post-metadata">

### Author: ![netpositive](https://avatars.discourse-cdn.com/v4/letter/n/8edcca/32.png) [@netpositive](https://meta.discourse.org/u/netpositive)
#### Post date: [5월 22, 2020, 11:18오전 UTC](https://meta.discourse.org/t/auto-cleanup-of-inactive-users-is-not-working/152064/6 "2020-05-22T11:18:25Z")

</div>

@tshenry 유용한 힌트 감사합니다! 어젯 오전에 정리 작업이 비활성 사용자를 일부 삭제한 것으로 보이므로, 해당 기능이 정상적으로 작동하는 것 같습니다 😌 문제는 우리 쪽 어딘가에 있는 것 같습니다. 제가 모르고 있는 사용자 관리용 도구가 있을까요?

@GI-Joe 네, 높은 레벨에서도 작동하면 좋겠어요 🤔

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [5월 22, 2020, 5:20오후 UTC](https://meta.discourse.org/t/auto-cleanup-of-inactive-users-is-not-working/152064/7 "2020-05-22T17:20:35Z")

</div>

> [@netpositive](#):
>
> 더 쉬운 사용자 관리를 위한 도구가 있는지 몰랐는데 있을까요?

있을 수도 있습니다. Rails 콘솔은 매우 강력한 도구로 사용할 수 있지만, 초보자에게는 다소 어렵습니다. 아직 사용해 본 적이 없고 시작하고 싶다면, 실험해 보고 작동 방식을 익힐 수 있는 테스트 사이트를 설정하는 것을 추천합니다. 비활성 사용자 작업은 [여기](https://github.com/discourse/discourse/blob/master/app/jobs/scheduled/clean_up_inactive_users.rb)에 정의되어 있습니다. 여기서 필요한 부분을 가져와 수정해 사용할 수 있습니다.

> [@netpositive](#):
>
> 음, 더 높은 레벨에도 작동하면 좋겠다 🤔

참고로 이 기능이 적용될 수 있는 다른 신뢰도 레벨은 TL1뿐입니다. TL2에는 "최소 **3** 개의 다른 주제에 답글을 남겼다"는 요건이 있기 때문입니다.

---

<div class="post-metadata">

### Author: ![KKavoussanakis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kkavoussanakis/32/193630_2.png) [@KKavoussanakis](https://meta.discourse.org/u/KKavoussanakis)
#### Post date: [9월 7, 2022, 11:28오전 UTC](https://meta.discourse.org/t/auto-cleanup-of-inactive-users-is-not-working/152064/8 "2022-09-07T11:28:05Z")

</div>

안녕하세요,

어제 설정값을 730에서 365로 변경했습니다. 어제 삭제된 모든 사용자는 최소 한 번 이상 로그인한 적이 있습니다.

사용자 로그에서 가져온 아래 예시를 참고해 주세요:

created\_at last\_seen\_at last\_posted\_at last\_emailed\_at trust\_level  
2020-05-08 14:44:07 UTC 2020-05-21 10:50:59 UTC 0

(한 번 생성되고 한 번 이메일을 받은 상태이며, 기타 모든 통계 값은 0입니다.)

현재 사용 중인 버전은 2.8.0.beta10입니다.
