by codetrotter · 3y ago · 0 comments
This is a perfect job for task-spooler! :D
To mirror your pypi data, I sshed into my server and did this:
mkdir -p ~/src/github.com/pypi-data
cd !$
wget https://raw.githubusercontent.com/pypi-data/data/main/links/repositories.txt
xargs -L1 tsp git clone --bare < repositories.txt
And then I closed the ssh connection to my server, knowing that my server will proceed to mirror all of those repositories of yours one by one :D xargs -L1 -P20 git clone --bare < repositories.txt(Or you could also run your way in tmux or screen.)
With task-spooler, it puts all of the commands (in this case, the individual git clone commands for each of the repos) in a queue and it runs the commands independently of my ssh session, so I can quickly add a bunch of jobs like this to the queue and immediately disconnect my ssh session.