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

Support for recursive scanning #380

Open
golyalpha opened this issue Apr 28, 2018 · 2 comments
Open

Support for recursive scanning #380

golyalpha opened this issue Apr 28, 2018 · 2 comments

Comments

@golyalpha
Copy link

golyalpha commented Apr 28, 2018

Now, I could add this feature, and I am going to work on this, but I still felt like this should be tracked with an issue (to separate discussion about the feature from discussion about the code itself). Also, no promises on me actually getting it done. (Seriously, most of my work is in Python and JS. Don't judge.)

Basically, the idea is to add an option for plot paths to be scanned recursively.

It would add another option for the "type" property, "recursive".
That way, a path to multiple drives/mountpoints containing plotfiles could be defined as:

{
"path" : "/media/plots",
"type" : "recursive"
}

Where the contents of /media/plots could be:

/media/plots
 - drive1
 - drive2
.
.
.
 - driven

Obviously this path definition can result in an increased overhead on scanning, if used incorrectly. But, if used correctly, it could provide a better setup option for miners.

Note that this isn't something that only Linux would benefit from - Windows supports mounting to file paths of an existing drive as well (a feature that is not exploited as often as it should be, in my opinion).

@Creepsky
Copy link
Owner

Creepsky commented May 2, 2018

Good idea, nice feature.
Suggestion: instead of "type": "recursive" a new field like "recursive": true/false would be better.
That way you can write something like:

{
    "path" : "/media/plots",
    "type" : "parallel",
    "recursive" : true
}

or

{
    "path" : [
        "/media/plots-a",
        "/media/plots-b"
    ],
    "type" : "sequential",
    "recursive" : true
}

@golyalpha
Copy link
Author

golyalpha commented May 2, 2018

True, it would allow control over how the files are read and how the files are discovered.

By the way, in the second example, you wouldn't even have to define the paths like that, since recursive mode would scan all subdirs of media for plot files. (Admittedly, a bad mountpoint choice if you have other devices that you connect to the rig and want to use the recursive mode)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants