Feature #76

Warn when download size in queue exceeds diskspace

Added by W3ird_N3rd almost 6 years ago. Updated over 5 years ago.

Status:In Progress Start:04/03/2011
Priority:Normal Due date:
Assigned to:Alguno % Done:

10%

Category:NNTPGrab Core
Target version:0.8.0
Votes: 1

Description

I have only 45GB of free diskspace left, but I can easily put 200GB in the nntpgrab queue. Probably at the most inconvenient moment possible this will lead to a massive disaster that can only end in an enormous explosion and a giant fireball.

Maybe nntpgrab could give a little warning when there's more stuff in the queue than diskspace is available?

nntpgrab_disk_utils.patch (9.6 KB) chrashoverraid, 11/21/2011 10:14 pm

History

Updated by chrashoverraid over 5 years ago

Note, I didn't implement this feature request, I only made a patch with some code which can be used.

I made a small patch so it is possible to get the total and remaining disksspace.
I also added this to the jsonrpc plugin. Maybe not the best code but it works for me ;)
I think it would be nice to show the total/available space in the webinterface!

It doesn't work for linux, it will always say "invalid request" but I think the request is OK. I think that there is a parse bug when there is a "/" in the request or something. haven't found out why yet.

You can get the result and when you divide the result by 2^30 (1073741824), you get the space in GB.
If you wan't the space in MB you can divide the result by 2^20 (1048576).

Updated by Alguno over 5 years ago

  • Status changed from New to In Progress
  • Assigned to set to Alguno
  • Target version set to 0.8.0
  • % Done changed from 0 to 10

Thanks for the patch!
This will help implementing this feature for sure.
I'll try to merge this patch and implement the rest of this feature for the 0.8 release of NNTPGrab.

Updated by chrashoverraid over 5 years ago

Can you also add two missing return statements? I forget them in this patch.
Line 1664 and 1697, sorry.

Also available in: Atom PDF