Diffusion Baloo b54f8ec94ac2

[balooctl] Streamline indexer control commands

Authored by bruns on Jun 8 2019, 4:19 PM.

Description

[balooctl] Streamline indexer control commands

Summary:
Currently, there are 7 commands which start/stop the indexer in some way:

  • stop/start/restart: stops or/and starts the indexer process, effective for the current session (on next login, the indexer is started when enabled).
  • suspend/resume: the indexer process keeps running, but does not process any file events (files added/delete/modified ...).
  • disable/enable: sets the enable state in the config, stops the indexer process and deletes the database. On enable (even when already enabled) forces a full reindex via the 'firstRun' flag. The deletion of the DB file was done silently.

The large number of similar commands is confusing by itself, and more
so its side effects.

The restart command was also racy, as it tried to start baloo_file even
when the old instance still held the DBus interface, then the new instance
would directly exit.

This removes the stop/start/restart command alltogether, and removes the
deletion of the DB from the disable command. Enable/disable still
starts/stops the 'baloo_file' process.

To allow deletion of the DB via CLI, a new "purge" command is added. In
case the indexer was enabled/running, it is kept enabled.

Reviewers: Baloo, ngraham, astippich, poboiko

Reviewed By: Baloo, ngraham

Subscribers: kde-frameworks-devel

Tags: Frameworks, Baloo

Differential Revision: https://phabricator.kde.org/D21674

Details

Committed
brunsJun 10 2019, 5:37 PM
Reviewer
Baloo
Differential Revision
D21674: [balooctl] Streamline indexer control commands
Parents
R293:5b6fd8fe88b7: [Transaction] Replace template for functor with std::function
Branches
Unknown
Tags
Unknown