Skip to content

Commit

Permalink
Fix to ensure git pulls don't lockup loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbie1977 authored Jul 17, 2024
1 parent d77d4a6 commit 31917f1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion scripts/startup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/bin/bash

for folder in $(find /opt/ | grep '/\.git$') ; do git --git-dir=$folder pull || : ; done;
TIMEOUT_DURATION=30
DELAY_DURATION=50

# Function to perform git pulls with timeout and delay
perform_git_pulls() {
for folder in $(find / -type d -name ".git"); do
# Perform the git pull with a timeout
timeout $TIMEOUT_DURATION git --git-dir="$folder" pull || :
# Wait for the specified delay duration
sleep $DELAY_DURATION
done
}

# Run the perform_git_pulls function as a subprocess
(perform_git_pulls &)

/root/anaconda3/bin/jupyter lab --ip='*' --NotebookApp.password="${JUPYPASS}" --no-browser --port 80 --allow-root

0 comments on commit 31917f1

Please sign in to comment.