Closed staltz closed 6 years ago
Aye, yes, there's a TODO if I've ever seen one.
TODO: use e.g. getport when setting up the swarm
wait, why would you run two seed processes? Is it one seed process per repo?
also... how do I know if seeding is working? (Is that why you're running two processes?)
@wmhilton the console tells you when it's replicating with others
Hmm. I guess I should redirect that to a log file if I'm running it as a background service then.
@wmhilton then maybe you have to worry about rotating those log files -- see how complicated bg processes get! :)
I just delete the log file on service restart. Log file rotation can always be done with a third party tool like logrotate
.
Also, you never answered my first question - why would you run hypergit seed twice?
@wmhilton I'm not sure why @staltz wanted to run two. I suggested the getport
change so that other local services that might use the same port don't break hypergit.
Actually in my opinion we could close this issue because when I opened it I didn't know that hypergit seed was looking at ~/.hypergit and seed all, I thought it was seeding only the one in the cwd.
The readme does suggest hypergit only seeds the repo in the cwd: "seed - Actively share this repo with other peers".
Yes, I thought maybe I was misunderstanding something because of the conflict between what's in usage.txt
and what I observed the code doing. I suggest we change the language in usage.txt and README to reflect the fact that it seeds ALL the repos. Which I think is the perfectly logical behavior... I don't want to micro-manage which repos are actively seeding (obviously, given my desire to automate it as a background service)... but if we wanted the ability to selectively seed we should add that as a new feature so as not to break the current behavior of hypergit seed
.
Oh shoot, you're right. I can see the confusion: hypergit seed
used to seed just the current repo. Then I centralized the repos to ~/.config/hypergit
. Let's update the usage & readme!
Done!
It seems like I can't
hypergit seed
in one terminal andhypergit seed
in another, the same port is used.