Help with retrying failed jobs (using API)

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
MikeC
Newbie
Newbie
Posts: 13
Joined: October 9th, 2016, 4:05 am

Help with retrying failed jobs (using API)

Post by MikeC »

I am having a few jobs fail due to articles not being propagated to the NNTP server I am using, they are there later when I try. I am currently manually pressing Retry but am trying to automate that process in a script I'm working on. I'm struggling to figure out what I'm doing wrong (if at all) with the API. I am using Sabnzbd 1.1.1RC1

I did this to see what failed jobs I had:

Code: Select all

http://server:8080/sabnzbd/api?mode=history&failed_only=1&apikey=<myAPIkey>&output=xml
I then tried:

Code: Select all

http://server:8080/sabnzbd/api?mode=retry_all&apikey=<myAPIkey>&output=xml
which retured this:

Code: Select all

<status><function retry_all_jobs at 0xb6376a30></status>
but then it did nothing.

I then located the nzo_id of the failed job which was something like SABnzbd_nzo_kxgwDV and also tried to retry the individual job using this:

Code: Select all

http://server:8080/sabnzbd/api?mode=retry&job=SABnzbd_nzo_kxgwDV&apikey=<myAPIkey>&output=xml
which never worked either, I also tried the job# as well but didn't think that was correct.

What am I doing wrong? Any help would be appreciated.
User avatar
safihre
Administrator
Administrator
Posts: 5521
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Help with retrying failed jobs (using API)

Post by safihre »

Hmmm, this is not good. Let me check if it's a problem on our side.
Regarding your Propagation problem, why don't you use the Propagation Delay feature in 1.1.0? It's in the Switches page, which will only start downloading a job when the job reaches at least the specified age in minutes. Age is not the time you added the job to the queue, but the time since it was posted by the uploader :)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
safihre
Administrator
Administrator
Posts: 5521
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Help with retrying failed jobs (using API)

Post by safihre »

I see the wiki is wrong, I fixed it now.
For a single job it should be:
api?mode=retry&value=NZO_ID

The retry_all API-function was broken.. And has been broken for a longggg time! Fixed it now.
Will be in 1.1.1.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
MikeC
Newbie
Newbie
Posts: 13
Joined: October 9th, 2016, 4:05 am

Re: Help with retrying failed jobs (using API)

Post by MikeC »

Many thanks for the info. I didn't know about the Propagation Delay feature. That could do the job for me.
Thank for fixing the wiki re: the single job change. Glad the retry_all will be fixed in future too.
Seems like I have various options to sort my problem out now moving forward. I'll experiment and see which I use.
I appreciate the great help in this regard.
Post Reply