balooctl monitor: Resume to wait for service
ClosedPublic

Authored by michaelh on Feb 21 2018, 1:05 PM.

Details

Summary

Keep monitoring until terminated by ctrl+c

Test Plan

While monitor is running various permutations of

  • balooctl stop
  • balooctl start
  • balooctl restart
  • echo otto >> ~/Documents/otto.csv

Diff Detail

Repository
R293 Baloo
Branch
resume-wait (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
michaelh created this revision.Feb 21 2018, 1:05 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 21 2018, 1:05 PM
michaelh requested review of this revision.Feb 21 2018, 1:05 PM
mwolff requested changes to this revision.Mar 7 2018, 9:44 AM
mwolff added a subscriber: mwolff.

some minor comments, otherwise lgtm

src/tools/balooctl/monitorcommand.cpp
45 ↗(On Diff #27678)

just make it i18n("Baloo died"), though I personally think that message should be improved - maybe "Baloo became unavailable" ?

also, call balooIsNotAvailable() from the slot here, that way you safe one connection. Or just move the m_err output to the balooIsNotAvailable slot.

61 ↗(On Diff #27678)

Press Ctrl + C to stop monitoring

65 ↗(On Diff #27678)

add a

m_dbusServiceWatcher->setWatchMode(QDBusServiceWatcher::WatchForOwnerChange);
71 ↗(On Diff #27678)

see above: i18n("Waiting for Baloo to start")

72 ↗(On Diff #27678)

see above

74 ↗(On Diff #27678)

remove this

80 ↗(On Diff #27678)

see above: i18n("Baloo is running")

82 ↗(On Diff #27678)

remove this

This revision now requires changes to proceed.Mar 7 2018, 9:44 AM
michaelh updated this revision to Diff 28909.Mar 7 2018, 11:01 AM
michaelh marked 8 inline comments as done.
michaelh edited the test plan for this revision. (Show Details)
  • Apply suggested changes
michaelh added inline comments.Mar 7 2018, 11:03 AM
src/tools/balooctl/monitorcommand.cpp
45 ↗(On Diff #27678)

Can be removed completely.

mwolff accepted this revision.Mar 7 2018, 1:41 PM
This revision is now accepted and ready to land.Mar 7 2018, 1:41 PM
This revision was automatically updated to reflect the committed changes.