Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay time between chapters #731

Open
RedSquirrel87 opened this issue Sep 25, 2022 · 6 comments
Open

Delay time between chapters #731

RedSquirrel87 opened this issue Sep 25, 2022 · 6 comments
Labels
bug Something isn't working major

Comments

@RedSquirrel87
Copy link
Owner

Original report by Ryszard Adamus (Bitbucket: [Ryszard Adamus](https://bitbucket.org/Ryszard Adamus), ).


Is the option named “Delay between starting the chapters download in second” for additional delay between chapters? If not, can You think about adding the settable delay time as a pause between completing one chapter and starting next one?

@RedSquirrel87
Copy link
Owner Author

Original comment by Red Squirrel (Bitbucket: Red_Squirrel, GitHub: RedSquirrel87).


Yes, that value will be added to the scheduled time for the next chapter to start downloading

@RedSquirrel87
Copy link
Owner Author

Original comment by Red Squirrel (Bitbucket: Red_Squirrel, GitHub: RedSquirrel87).


For example: let’s say you set “Max number of concurrent downloads” value to 3 and download three chapters, if the delay is set to 0 then all the three chapters will start at the same time, but if the delay is set to 2 then only the first chapter will start to download while the second chapter will start after 2 seconds and the third chapter after 4 seconds (2 seconds later than the second chapter)

@RedSquirrel87
Copy link
Owner Author

Original comment by Ryszard Adamus (Bitbucket: [Ryszard Adamus](https://bitbucket.org/Ryszard Adamus), ).


So it won’t work when concurrent is set to 1? I mean in that case when first chapter is completed then second will download immadietly because app is counting the time from chapter start, not completed?

@RedSquirrel87
Copy link
Owner Author

Original comment by Red Squirrel (Bitbucket: Red_Squirrel, GitHub: RedSquirrel87).


It should work with any concurrent value, the above was just an example. The program will add the delay to the “scheduled time when the chapter should start based on the previous one”. So if you set concurrent to 1, since the scheduled time for the second chapter to start is the end of the first chapter download this mean that the second chapter will start at the end of the download of the first chapter plus the delay value you set

@RedSquirrel87
Copy link
Owner Author

Original comment by Ryszard Adamus (Bitbucket: [Ryszard Adamus](https://bitbucket.org/Ryszard Adamus), ).


Well, i set this value to 15 seconds but next chapter starts immediately after the one which was completed. Observed this trending for few next chapters. Can You check it? Maybe something is broken in current version.

@RedSquirrel87
Copy link
Owner Author

Original comment by Red Squirrel (Bitbucket: Red_Squirrel, GitHub: RedSquirrel87).


Yeah, you’re right, I just checked and it seems to be broken, or better to say, the JAVA native function seems to be bugged. The documentation for the function explicitly speeks about “delay between the termination of one execution and the commencement of the next”:


But it does not work that way, the delay seems to be counted from the moment you add the job to the executor engine and not from the termination of the last one.

Well, I’ll insert a workaround personal function in the next version for now, hoping this will be fixed soon by Oracle in the JAVA language

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

1 participant