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

Conversation

@BenLubar
Copy link
Contributor

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 BenLubar force-pushed the BenLubar-PR:cull-dry-run branch from 4d66a87 to 046ab3e Apr 3, 2019
@BenLubar

This comment has been minimized.

Copy link
Contributor Author

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
@BenLubar BenLubar force-pushed the BenLubar-PR:cull-dry-run branch from 963702f to e2d246f Apr 3, 2019
@ThibG
ThibG approved these changes 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

This comment has been minimized.

Copy link
@ThibG

ThibG Apr 3, 2019

Collaborator

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

@Gargron

This comment has been minimized.

Copy link
Member

commented Apr 4, 2019

Please modify the changelog with the corresponding message as well

BenLubar added a commit to BenLubar-PR/mastodon that referenced this pull request Apr 4, 2019
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@BenLubar BenLubar force-pushed the BenLubar-PR:cull-dry-run branch from 4d83b49 to 0a14cad Apr 4, 2019
@Gargron
Gargron approved these changes Apr 4, 2019
@Gargron Gargron merged commit e6814a3 into tootsuite:master Apr 4, 2019
11 checks passed
11 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: check-i18n Your tests passed on CircleCI!
Details
ci/circleci: install Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.4 Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.5 Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.6 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.4 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.5 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.6 Your tests passed on CircleCI!
Details
ci/circleci: test-webui Your tests passed on CircleCI!
Details
codeclimate All good!
Details
hiyuki2578 added 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 tootsuite#10460.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.