Skip to content

Commit

Permalink
build02/nixpkgs-update: run fetchers every 12 hours
Browse files Browse the repository at this point in the history
also add a sleep to ensure network is accessible
  • Loading branch information
zowoq committed Feb 12, 2024
1 parent 8c8f5bb commit 62adc18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hosts/build02/nixpkgs-update.nix
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,14 @@ let
script = ''
mkdir -p "$LOGS_DIRECTORY/~fetchers"
cd "$LOGS_DIRECTORY/~fetchers"
sleep 60 # wait for network
while true; do
run_name="${name}.$(date +%s).txt"
rm -f ${name}.*.txt.part
${cmd} > "$run_name.part"
rm -f ${name}.*.txt
mv "$run_name.part" "$run_name"
sleep 24h
sleep 12h
done
'';
};
Expand Down

0 comments on commit 62adc18

Please sign in to comment.