Page 2 of 4

Re: set priority of Backup Server

Posted: January 16th, 2013, 12:08 am
by videojaq
As this is one of THE MOST requested features, as far as I can tell...
Now, I can't speak for my fellow users... but I would be willing to donate more towards SAB in order to see this feature implemented sooner rather than later.

Also, hopefully there won't be a limit to the number and level of prioritized servers?

Cheers.

Re: set priority of Backup Server

Posted: January 16th, 2013, 5:51 am
by shypike
videojaq wrote:but I would be willing to donate more towards SAB in order to see this feature implemented sooner rather than later.
Time is the bottleneck.
Throwing more money at it (unless it's a huge amount) won't help...
It's also one of the more difficult parts of SABnzbd, so external help is not to be expected.

Re: set priority of Backup Server

Posted: January 16th, 2013, 2:51 pm
by videojaq
shypike wrote:
videojaq wrote:but I would be willing to donate more towards SAB in order to see this feature implemented sooner rather than later.
Time is the bottleneck.
Throwing more money at it (unless it's a huge amount) won't help...
It's also one of the more difficult parts of SABnzbd, so external help is not to be expected.
ah well, it was worth tossing the idea...

GOD SPEED! ;D



EDIT - I'd help if I know anything about python programming :P

Re: set priority of Backup Server

Posted: December 16th, 2013, 6:33 pm
by Fmstrat
shypike wrote:Time is the bottleneck.
Throwing more money at it (unless it's a huge amount) won't help...
It's also one of the more difficult parts of SABnzbd, so external help is not to be expected.
Hi shypike,

I know this isn't the newest post on the topic, but since it's the first result on Google I figured I would respond here.

I spent the day today forking sabnzbd in github to https://github.com/Fmstrat/sabnzbd and I think I've got an enhancement in place for this. It took me longer to figure out the current process than it did to update for priorities. :)

As it stands now, Primary servers still outrank Backup servers regardless of the number set in the priority setting. 0 priority means it will be used first, higher numbers later. On upgrade everything is set to 0, retaining current randomized backup order.

The code has a ton of debug logging calls in it now that I'll remove after I've tested this for a while before pushing up to the master (new to git, so still figuring that out).

Thanks,
B.

Re: set priority of Backup Server

Posted: December 17th, 2013, 2:58 am
by shypike
That's a great initiative. It's good that fresh eyes look at this.
Please report your results.
I'm going to need some time to assess what you did here.
After Christmas, I will have more time to work on the next release (0.8.0) and this might be a good candidate feature.

BTW: It looks you are working on the "master" branch.
The current maintenance branch is 0.7.x and the branch leading to 0.8.0 is called "develop".
Each release of 0.7.x should have been merged to "master", but "0.7.x" and "develop" have diverged to much.
(Later on "develop" will be merged into "master").
Summary: please base your work on either "0.7.x" or "develop", not on "master".

Re: set priority of Backup Server

Posted: December 17th, 2013, 9:28 am
by Fmstrat
shypike wrote:That's a great initiative. It's good that fresh eyes look at this.
Please report your results.
I'm going to need some time to assess what you did here.
After Christmas, I will have more time to work on the next release (0.8.0) and this might be a good candidate feature.

BTW: It looks you are working on the "master" branch.
The current maintenance branch is 0.7.x and the branch leading to 0.8.0 is called "develop".
Each release of 0.7.x should have been merged to "master", but "0.7.x" and "develop" have diverged to much.
(Later on "develop" will be merged into "master").
Summary: please base your work on either "0.7.x" or "develop", not on "master".
Thanks,

I'll reapply to .7.x (sorry, like I said, new to git). At a 30,000 foot view, other than altering the skins for configuration (added another variable called "priority" that is the exact same format as "connections"), the big alteration is in the Article.get_article function. I noticed it was originally running over and over in the while loop and saying "yes" or "no" to using a server, with a decision point on if there were fills. I simply made that function "allow" the servers in priority order, instead just on primary vs. fill.

Also, for the Wiki when it comes time:

Priority:
Server priority defines what order servers will be downloaded from. A priority of 0 is considered highest, while a priority of 100 is considered lowest. Backup servers are considered lower priority than primary servers, regardless of what priority numbers are set.

Thanks again,
B.

Re: set priority of Backup Server

Posted: December 17th, 2013, 10:41 am
by Fmstrat
*EDIT*
Ignore the below. I figured it out. I'm just going to delete my fork and start over to make sure my master branch is clean.
*EDIT*

Hi shypike,

Sorry to ask a dumb git question in this forum, but trying to push this up to git in the 0.7.x branch as you requested, and none of the docs online are answering my question as it relates to an overlap in name where an "x" is used in the tag. My process:

1: git checkout remotes/origin/0.7.x
2: git checkout -b remotes/origin/0.7.x (needed to do this to edit)
3: Edited all the files again to ensure no conflicts
4: git status
# On branch remotes/origin/0.7.x
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: interfaces/Classic/templates/config_server.tmpl
# modified: interfaces/Config/templates/config_server.tmpl
# modified: interfaces/Plush/templates/config_server.tmpl
# modified: interfaces/smpl/templates/config_server.tmpl
# modified: interfaces/wizard/one.html
# modified: interfaces/wizard/static/javascript/checkserver.js
# modified: sabnzbd/config.py
# modified: sabnzbd/downloader.py
# modified: sabnzbd/nzbqueue.py
# modified: sabnzbd/nzbstuff.py
# modified: sabnzbd/skintext.py
#
5: git commit -m "Updated for server priority support" -a
# [remotes/origin/0.7.x d2e6a24] Updated for server priority support
# 11 files changed, 115 insertions(+), 21 deletions(-)
6: git push origin remotes/origin/0.7.x
# error: src refspec remotes/origin/0.7.x matches more than one.
# error: failed to push some refs to 'https://github.com/Fmstrat/sabnzbd.git'

I can't seem to work around this last problem. Any ideas? If I just use "git push" it puts it to master, even though I'm working in the 0.7.x branch.

Re: set priority of Backup Server

Posted: December 17th, 2013, 11:50 am
by Fmstrat
OK, changes are up in the 0.7.x branch of my fork.

Re: set priority of Backup Server

Posted: December 17th, 2013, 12:01 pm
by sab12397
shypike I am following your develop branch (for some reason this does not have your 0.7.17 beta release but it has the server totals in history which is why I am using develop) would it be feasible to get these server priority enhancements into your develop branch?

It is great someone has taken the time to contribute to the project so it would be a pity not to get it into an "official" branch for testing.

Personally I hope we do not end up with multiple forks.

Re: set priority of Backup Server

Posted: December 17th, 2013, 2:10 pm
by shypike
Working on "develop" is OK, please continue.
I will merge the later 0.7.x changes into the develop branch after Christmas.

Re: set priority of Backup Server

Posted: January 10th, 2014, 1:48 pm
by Fmstrat
Hey shypike,

I just wanted to check in on the server priority update and say let me know if I need to do a pull request/etc. I've been running the patch for a few weeks now and it seems pretty successful thus far.

Thanks.

Re: set priority of Backup Server

Posted: January 11th, 2014, 5:58 am
by shypike
I haven't had time to sync "develop" with "0.7.x" yet :(

Re: set priority of Backup Server

Posted: January 12th, 2014, 7:01 am
by sab12397
I am confused - should the develop branch have Fmstrat server priority patch but not the 0.7.17 changes?

I can't find neither Fmstrat or 0.7.17 changes in the develop branch?

shypike do you need something from Fmstrat as I would also like to try out these changes?

It is a bit strange that there are multiple branches with different feature sets - there is no method of testing as you need to be running three versions of SAB (Fmstrat version, develop branch and 0.7 branch)?

Re: set priority of Backup Server

Posted: January 13th, 2014, 6:48 am
by shypike
sab12397 wrote:
shypike do you need something from Fmstrat as I would also like to try out these changes?
Fmstrad is working on a private branch to implement this.
For proper later integration he should base his work on the right master branch.
If you want to use his software, you'll need to use his GIT repository.
I don't know whether his repository is public. You can PM him for that perhaps.

Re: set priority of Backup Server

Posted: January 13th, 2014, 7:51 am
by Fmstrat
shypike wrote: Fmstrad is working on a private branch to implement this.
For proper later integration he should base his work on the right master branch.
If you want to use his software, you'll need to use his GIT repository.
I don't know whether his repository is public. You can PM him for that perhaps.
Yes, it's public. However, I thought I was following your directions for how I should contribute, since I was originally working on the master branch:
shypike wrote:BTW: It looks you are working on the "master" branch.
The current maintenance branch is 0.7.x and the branch leading to 0.8.0 is called "develop".
Each release of 0.7.x should have been merged to "master", but "0.7.x" and "develop" have diverged to much.
(Later on "develop" will be merged into "master").
Summary: please base your work on either "0.7.x" or "develop", not on "master".
If there is something else I need to do, let me know. Changes can be seen here and I can do a pull request if that helps: https://github.com/Fmstrat/sabnzbd/compare/0.7.x

Thanks!