Avoid wakelock expiration if the check take much time

Never happend before but it is definitely possible that the 30s duration
could expire if the following trigger take longer than 20s. By example
in case of network issue.

The goal of this default duration is to avoid stucked wake
locks, even if this could theorically not happen anyway. So let's use a
big value to avoid causing troubles.
This commit is contained in:
Willow Barraco
2023-03-30 17:19:45 +02:00
parent 75e7c33209
commit 08f7320205

View File

@@ -18,7 +18,7 @@ finish() {
exec 3<> "${XDG_RUNTIME_DIR:-$HOME}/sxmo.checkwakelocks.lock"
flock -x 3
DEFAULT_DURATION=30s # to be sure to not lock indefinitely
DEFAULT_DURATION=120s # to be sure to not lock indefinitely
sxmo_wakelock.sh lock checking_wakelocks "$DEFAULT_DURATION"