[tracker-miners/wip/carlosg/cli-improvements: 23/47] tracker-extract: Restart service on unclean exit
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/cli-improvements: 23/47] tracker-extract: Restart service on unclean exit
- Date: Wed, 19 Aug 2020 11:31:31 +0000 (UTC)
commit 29908ca017bc62dfd9c07000658332bf2d63429c
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Aug 16 15:42:20 2020 +0200
tracker-extract: Restart service on unclean exit
And ensure to exit uncleanly after cancellation. We used to rely on
tracker-miner-fs to restart tracker-extract if there's things pending
extraction. It doesn't ensure it that hard anymore, so we can't rely
on it.
src/tracker-extract/tracker-extract-decorator.c | 2 +-
src/tracker-extract/tracker-extract.c | 2 +-
src/tracker-extract/tracker-extract.service.in | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-decorator.c b/src/tracker-extract/tracker-extract-decorator.c
index 84451fc8f..fa40a2d66 100644
--- a/src/tracker-extract/tracker-extract-decorator.c
+++ b/src/tracker-extract/tracker-extract-decorator.c
@@ -234,7 +234,7 @@ task_cancellable_cancelled_cb (GCancellable *cancellable,
uri);
g_free (uri);
- _exit (0);
+ _exit (EXIT_FAILURE);
}
static void
diff --git a/src/tracker-extract/tracker-extract.c b/src/tracker-extract/tracker-extract.c
index e19bc0b40..a0195a4c3 100644
--- a/src/tracker-extract/tracker-extract.c
+++ b/src/tracker-extract/tracker-extract.c
@@ -331,7 +331,7 @@ task_deadline_cb (gpointer user_data)
g_warning ("File '%s' took too long to process. Shutting down everything",
task->file);
- _exit (0);
+ _exit (EXIT_FAILURE);
}
static TrackerExtractTask *
diff --git a/src/tracker-extract/tracker-extract.service.in b/src/tracker-extract/tracker-extract.service.in
index f2cfeafeb..20ab2561c 100644
--- a/src/tracker-extract/tracker-extract.service.in
+++ b/src/tracker-extract/tracker-extract.service.in
@@ -6,7 +6,7 @@ ConditionUser=!root
Type=dbus
BusName=org.freedesktop.Tracker3.Miner.Extract
ExecStart=@libexecdir@/tracker-extract-3
-Restart=on-abnormal
+Restart=on-failure
# Don't restart after tracker daemon -k (aka tracker-control -k)
RestartPreventExitStatus=SIGKILL
Slice=background.slice
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]