remove requirements install

main
Shane 7 months ago
parent 12383c6d4e
commit 9c15c1b658
  1. 26
      manage_scripts.sh
  2. 3
      requirements.txt

@ -65,7 +65,8 @@ run_script() {
else else
log "$script failed with exit code $exit_code" log "$script failed with exit code $exit_code"
fi fi
sleep_time=$(tail -n 1 "$script_log" | grep -oP 'sleep_time: \K[0-9]+' || echo $((RANDOM % 601 + 1200))) # Extract sleep time from the last line containing "sleep_time:"
sleep_time=$(grep "sleep_time:" "$script_log" | tail -n 1 | grep -oP 'sleep_time: \K[0-9]+' || echo $((RANDOM % 601 + 1200)))
log "$script completed, sleep_time: $sleep_time seconds" log "$script completed, sleep_time: $sleep_time seconds"
rm -f "$LOCK_DIR/${script_name}.lock" rm -f "$LOCK_DIR/${script_name}.lock"
echo "$sleep_time" echo "$sleep_time"
@ -100,17 +101,18 @@ update_dependencies() {
log "Created new virtual environment" log "Created new virtual environment"
fi fi
source "$BASE_DIR/venv/bin/activate" source "$BASE_DIR/venv/bin/activate"
"$VENV_PYTHON" -m pip install --upgrade pip # Commenting out dependency installation since packages are already installed and working
if [ -f "requirements.txt" ]; then # "$VENV_PYTHON" -m pip install --upgrade pip
"$VENV_PYTHON" -m pip install -r requirements.txt || { # if [ -f "requirements.txt" ]; then
log "Failed to install requirements.txt, attempting core dependencies" # "$VENV_PYTHON" -m pip install -r requirements.txt || {
"$VENV_PYTHON" -m pip install requests openai beautifulsoup4 feedparser praw duckduckgo_search selenium Pillow pytesseract webdriver-manager tweepy python-dotenv flickr-api filelock requests-oauthlib psutil # log "Failed to install requirements.txt, attempting core dependencies"
log "Fallback: Installed core dependencies" # "$VENV_PYTHON" -m pip install requests openai beautifulsoup4 feedparser praw duckduckgo_search selenium Pillow pytesseract webdriver-manager tweepy python-dotenv flickr-api filelock requests-oauthlib psutil
} # log "Fallback: Installed core dependencies"
else # }
log "Error: requirements.txt not found, installing core dependencies" # else
"$VENV_PYTHON" -m pip install requests openai beautifulsoup4 feedparser praw duckduckgo_search selenium Pillow pytesseract webdriver-manager tweepy python-dotenv flickr-api filelock requests-oauthlib psutil # log "Error: requirements.txt not found, installing core dependencies"
fi # "$VENV_PYTHON" -m pip install requests openai beautifulsoup4 feedparser praw duckduckgo_search selenium Pillow pytesseract webdriver-manager tweepy python-dotenv flickr-api filelock requests-oauthlib psutil
# fi
log "Dependencies updated." log "Dependencies updated."
} }

@ -12,5 +12,4 @@ tweepy==4.15.0
python-dotenv==1.1.0 python-dotenv==1.1.0
flickr-api==0.7.7 flickr-api==0.7.7
filelock==3.16.1 filelock==3.16.1
requests-oauthlib==2.0.0 requests-oauthlib==2.0.0
psutil==7.0.0
Loading…
Cancel
Save