Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F83543793
pull-daemons.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Sep 17, 17:32
Size
553 B
Mime Type
text/x-shellscript
Expires
Thu, Sep 19, 17:32 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20854983
Attached To
rPHINFRA c4science
pull-daemons.sh
View Options
#!/bin/bash
BIN={{ phabricator_path }}phabricator/bin
NB={{ phd_pull_number }}
# Get repo and split in equal amount
$BIN/repository list > /tmp/repo
lines=$(wc -l /tmp/repo | awk '{print $1}')
split -d -l $(($lines / $NB)) /tmp/repo /tmp/repo_
# Launch single daemon for new repo excluding current repo
NOT=$(cat /tmp/repo | tr '\n' ' ' | sed 's/ / --not /g')
$BIN/phd launch 1 pull -- --not $(echo ${NOT::-7})
# Launch specialized daemons
for i in $(ls /tmp/repo_*); do
$BIN/phd launch 1 pull -- $(cat $i | tr '\n' ' ')
done
rm -f /tmp/repo*
Event Timeline
Log In to Comment