Reminder priority randomly not respected

You found a bug or have any issues? Please post them here!
jsonio
Posts: 34
Joined: 10 Dec 2018 11:39

Reminder priority randomly not respected

Post by jsonio » 30 Nov 2019 13:33

Hello Bernd,

I asked you a few months a ago if it would be possible to add a priority system for multiples reminders that are executed exactly at the same time.

We used it from then but today I noticed in the debug log that sometimes, the priority is not respected (it seems to be a random problem).

Here are the attachments of the problem we encounteer, the priority 0 reminder is executed after the priority 1 reminder.

bernd3.PNG
bernd2.PNG
bernd1.png
bernd1.png (8.51 KiB) Viewed 5357 times
Thank you a lot in advance for your help,

jsonio

User avatar
radio42
Site Admin
Posts: 6374
Joined: 05 Apr 2012 16:26

Re: Reminder priority randomly not respected

Post by radio42 » 02 Dec 2019 20:43

Yes, you are right. Reminders are independently executed each in their own thread.
As such, the Prio. isn't really honored - I'll take a look to fix that!
As a workaround you might trigger the 2nd reminder 1 sec. later.

However, your command sequence doesn't really look, as if it would make sense?
Why start and stop the recording in exactly the same time?

jsonio
Posts: 34
Joined: 10 Dec 2018 11:39

Re: Reminder priority randomly not respected

Post by jsonio » 03 Dec 2019 13:24

Hello Bernd,

Thank you very much for your reply.
The reminder is used to record LIVE broadcasting on the input "IN".
They don't have the same schedule as the automatic PF player (So we can't rely on a programchange event to record them because the program sometimes changes during the LIVE).

i.e. what happens :

6pm START REC IN the LIVE1 > PODCAST1.mp3
8pm STOP REC IN prio:0 ->podcast1.mp3 = exactly 2hours long

+ some weeks (so we need 2 different reminders to be sure it will be stopped if there is no LIVE2)

8pm START REC IN prio:1 the LIVE2 > PODCAST2.mp3
10pm STOP REC IN ->podcast2.mp3 = exactly 2hours long

If I choose 8:00:01 pm or 7:59:59, the podcast will be slightly cut which is not accurate enough for a podcast that is sent later to other radios and rebroacasted.

Maybe then it would be easier for you to include ms, in the reminder time?
Like stop REC at 7:59:59.999 pm
And start REC at 8:00:00.000 pm

Or maybe there is a command that would permit to force to target the thread used to record, like :

6pm START REC IN with THREAD1 the LIVE1 > PODCAST1.mp3
8pm STOP REC IN with THREAD1 ->podcast1.mp3 = exactly 2hours long
8pm START REC IN with THREAD2 the LIVE2 > PODCAST2.mp3
10pm STOP REC IN with THREAD2 ->podcast2.mp3 = exactly 2hours long

In this case, the two threads could be processed exactly at the same time with no matter the priority.

Or maybe there is a command to stop recording by the filename?

Thank you a lot for your help,

Justin

User avatar
radio42
Site Admin
Posts: 6374
Joined: 05 Apr 2012 16:26

Re: Reminder priority randomly not respected

Post by radio42 » 03 Dec 2019 18:42

Note, that you can issue 2 or more commands in one reminder!
And also note, that a start of a new recording would anyhow automatically stop any previous recording.

So I guess there is no need for using 2 reminders.

jsonio
Posts: 34
Joined: 10 Dec 2018 11:39

Re: Reminder priority randomly not respected

Post by jsonio » 03 Dec 2019 19:43

Thank you a lot for your answer.
We splitted the commands into 2 reminders because they don't have the same recurrence (the STOP has to happen every week but not the RESTART) .

User avatar
radio42
Site Admin
Posts: 6374
Joined: 05 Apr 2012 16:26

Re: Reminder priority randomly not respected

Post by radio42 » 03 Dec 2019 20:13

I’ll seeing I can fix that soon!

jsonio
Posts: 34
Joined: 10 Dec 2018 11:39

Re: Reminder priority randomly not respected

Post by jsonio » 09 Dec 2019 21:17

Thank you very much :)

User avatar
radio42
Site Admin
Posts: 6374
Joined: 05 Apr 2012 16:26

Re: Reminder priority randomly not respected

Post by radio42 » 15 Dec 2019 19:36

Fixed in v4.1.5.2

jsonio
Posts: 34
Joined: 10 Dec 2018 11:39

Re: Reminder priority randomly not respected

Post by jsonio » 07 Feb 2020 16:13

Hello Bernd,

1- Thank you very much but unfortunately it is still not working... so we tried to add different timings to show the commands in the message center hoping that it would force the order of the commands to be respected but it was unsuccessful.
cap-bug1-2.PNG
cap-bug1-2.PNG (10.58 KiB) Viewed 3899 times
cap-bug3.PNG
cap-bug4.PNG
I'm just thinking about something... maybe it is actually working but the problem is we misunderstood the way the scale of priority is?

It this (as we think)

0 highest (execute first)
1 high
2 normal
3 low
4 very low
999 (execute last)
etc.

or the exact opposite

0 lowest (execute last)
1 very low
2 low
3 normal
4 high
999 highest (execute first)
?

2- For a recurring reminder, when we change the "start time" field, the new time is not taken into account but if we change it in the "recurrence" pannel, the reminder is correctly executed at the new time.

Thank you a lot in advance,

jsonio

User avatar
radio42
Site Admin
Posts: 6374
Joined: 05 Apr 2012 16:26

Re: Reminder priority randomly not respected

Post by radio42 » 07 Feb 2020 20:50

Yes, the start time needs to be changed in the recurring form for recurring items.

You can click on the '?' icon at the very top right of the dialog to get help...
Prio: (Priority)
Defines the order in which reminders are used/executed in case multiple start at exactly the same time (0, 1, 2, 3, ...)!
A reminder starts at exactly the time, if the 'Start Time' AND the 'Show in Advance' value do have the exact same values, resp. result to the exact same effective time.

So yes, it should order it that way (0, than 1, than 2 ...).
But you need to adjust your "Show In Advance" time to the exact same value!
But I guess there might indeed still be an issue in my code...I'll double check!

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests