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

Add `tootctl statuses remove` to sweep unreferenced statuses #10063

Merged
merged 1 commit into from Mar 11, 2019

Conversation

@Gargron
Copy link
Member

commented Feb 16, 2019

Query by @tateisu

Fix #1554

For discussion:

  • Name of command
  • Interface of command, e.g. options
  • Verbosity of command
  • The query itself
@nightpool

This comment has been minimized.

Copy link
Collaborator

commented Feb 16, 2019

needs to handle statuses fetched by threadresolveworker (i.e. root statuses with replies from remote followed accounts).

@tateisu

This comment has been minimized.

Copy link
Contributor

commented Feb 17, 2019

even it does not have reply id,it will not deleted.
because it will contains mention to local user.
also toots from remote followed user.

@nightpool

This comment has been minimized.

Copy link
Collaborator

commented Feb 17, 2019

user A (not followed by anybody) posts
user B replies to A (followed by local user C)

user A's status is fetched by thread resolve worker, but not excluded from this query.

@tateisu

This comment has been minimized.

Copy link
Contributor

commented Feb 17, 2019

.where('id NOT IN (SELECT statuses1.in_reply_to_id FROM statuses AS statuses1 WHERE statuses.id = statuses1.in_reply_to_id)') is excludes all statuses that have replies.

@tateisu

This comment has been minimized.

Copy link
Contributor

commented Feb 17, 2019

@Gargron Gargron marked this pull request as ready for review Feb 18, 2019
@ykzts
ykzts approved these changes Mar 11, 2019
@Gargron Gargron merged commit 6766502 into master Mar 11, 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
@Gargron Gargron deleted the feature-tootctl-statuses-remove branch Mar 11, 2019
@BenLubar

This comment has been minimized.

Copy link
Contributor

commented Mar 31, 2019

A description more precise than Remove statuses might make more admins run it. I only learned what this actually does because I was curious, and I wouldn't have ever run it if I didn't see the query.

hiyuki2578 added a commit to ProjectMyosotis/mastodon that referenced this pull request Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.