Page 1 of 1

Possible bug? Script editing changes speed and pauses all downloads

Posted: August 10th, 2008, 1:05 pm
by MajorHavoc
I have the following schedule items:
Daily: 06:00: Speedlimit 60
Monday through Friday: 12:00: pause (as 5 schedule items, one for each day)
Daily: 19:00: Resume
Daily:19:01: Speedlimit 75
Daily:23:30: Speedlimit 100

The schedules work fine when left alone. However, if I try and edit the schedule in the morning, say 11 AMĀ  (for example, I removed a Daily: 23:00: Speedlimit 100 and replaced it with the 23:30 one, or add a new Speedlimit change, or remove one), all downloads immediately go to PAUSE, and the the speed limit is set to 60.

It almost seems as if the program parses the schedule and sets the conditions as they would be for the time at which the edit takes place. That is cool, and explains the speedlimit 60, but not the pause.

Is this a bug, or as designed?

Thanks

Re: Possible bug? Script editing changes speed and pauses all downloads

Posted: August 10th, 2008, 4:15 pm
by shypike
Yes, it does evaluation of the speed at restart (i.e. after chaning the schedule).
I would have to check the exact situation regarding the pauses.

Re: Possible bug? Script editing changes speed and pauses all downloads

Posted: August 11th, 2008, 1:50 pm
by MajorHavoc
Thanks. The speed thing makes sense. It just does not come out of PAUSE. Now this could be an eval thing as well, but I posted my schedule as it, so it should know it is running. UNLESS, you start the eval of the schedule at a time other than midnight?
Cheers

Re: Possible bug? Script editing changes speed and pauses all downloads

Posted: August 11th, 2008, 3:52 pm
by shypike
So far I cannot reproduce your problem.

When the current state is Paused, the schedule evaluation will never set the
state to Resume. This prevents spontaneous resumption during schedule editing.
When the current state is Resume, the schedule evaluation can cause a Pause.

I'll file it as a bug (#81), but since I cannot reproduce it so far, it will take some time.

Re: Possible bug? Script editing changes speed and pauses all downloads

Posted: August 12th, 2008, 5:21 am
by shypike
I had some problem deriving the specification from the code.
The current behavior is not easy to explain, therefore what will be done is this.
(Taken from the text of ticket #81).
Schedule changes, cause a re-evaluation of the schedule. Now spontaneous resume of a paused download is prevented. This is a safety measure to prevent spontaneous resumption during schedule edits. However this feature is difficult to explain and gives a feeling of unpredictability.

Change the code so that the evaluated pause/resume state is used. (Note: the feature that a command-line "-p" overrules the schedule, should be kept).
It could be that some side-effect or error causes your problem.
With the above change, your problem should go away anyway.

Re: Possible bug? Script editing changes speed and pauses all downloads

Posted: September 3rd, 2008, 7:10 pm
by MajorHavoc
That will work. Thanks.