Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tootctl accounts cull #10460

Merged
merged 3 commits into from
Apr 4, 2019
Merged

Fix tootctl accounts cull #10460

merged 3 commits into from
Apr 4, 2019

Conversation

BenLubar
Copy link
Contributor

@BenLubar BenLubar commented Apr 3, 2019

Prevent unreachable domains from inheriting the previous status code.

Also list the actual accounts that would have been culled during a dry run.
(Otherwise, the dry run mode is basically useless.)

Otherwise, the dry run mode is basically useless.
@BenLubar
Copy link
Contributor Author

BenLubar commented Apr 3, 2019

(sorry Code Climate robot, I'm too used to bash scripting)

@BenLubar BenLubar changed the title List the actual accounts that would have been culled during a dry run. Fix tootctl accounts cull Apr 3, 2019
skip_domains = Set.new
dry_run = options[:dry_run] ? ' (DRY RUN)' : ''

Account.remote.where(protocol: :activitypub).partitioned.find_each do |account|
next if account.updated_at >= skip_threshold || (account.last_webfingered_at.present? && account.last_webfingered_at >= skip_threshold)

code = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have put a next like in the other rescue instead of that, but LGTM

@Gargron
Copy link
Member

Gargron commented Apr 4, 2019

Please modify the changelog with the corresponding message as well

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@Gargron Gargron merged commit e6814a3 into mastodon:master Apr 4, 2019
hiyuki2578 pushed a commit to ProjectMyosotis/mastodon that referenced this pull request Oct 2, 2019
* List the actual accounts that would have been culled during a dry run.

Otherwise, the dry run mode is basically useless.

* Prevent unreachable domains from inheriting the previous status code.

* Update CHANGELOG.md for mastodon#10460.
messenjahofchrist pushed a commit to Origin-Creative/mastodon that referenced this pull request Jul 30, 2021
* List the actual accounts that would have been culled during a dry run.

Otherwise, the dry run mode is basically useless.

* Prevent unreachable domains from inheriting the previous status code.

* Update CHANGELOG.md for mastodon#10460.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants