wip
This commit is contained in:
1 parent
1905440212
commit
fc0f18ba73
6 files changed
+13
-46
No files matched your search
@@ -66,10 +66,6 @@ class DaysTournament
|
|||||||
$tournament = $row['tournament'];
|
$tournament = $row['tournament'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($debug) {
|
|
||||||
Notice::note($tournament, 'g');
|
|
||||||
}
|
|
||||||
|
|
||||||
$category = $tournament['category'];
|
$category = $tournament['category'];
|
||||||
|
|
||||||
if ($sport_id == 5) {
|
if ($sport_id == 5) {
|
||||||
@@ -169,7 +165,8 @@ class DaysTournament
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($debug) {
|
||||||
Notice::note('days tournament done', 'g');
|
Notice::note('days tournament done', 'g');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@@ -140,7 +140,9 @@ class Grapper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($debug) {
|
||||||
Notice::note('tournament done', 'bb');
|
Notice::note('tournament done', 'bb');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@@ -24,8 +24,8 @@ class LoadDays
|
|||||||
|
|
||||||
$task = SofaScoreTask::with('sport')->where('id', $task_id)->first();
|
$task = SofaScoreTask::with('sport')->where('id', $task_id)->first();
|
||||||
|
|
||||||
if(!$debug){
|
if ($debug) {
|
||||||
Notice::note('grapper: '.$task->mode.' sport: '.$task->sport_id);
|
Notice::note('LoadDays ' . $task->mode . ' sport: ' . $task->sport_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($task->mode) {
|
switch ($task->mode) {
|
||||||
|
|||||||
@@ -11,6 +11,11 @@ class LoadTournaments
|
|||||||
public static function load()
|
public static function load()
|
||||||
{
|
{
|
||||||
$sport_id = Nuh::$options['sport_id'];
|
$sport_id = Nuh::$options['sport_id'];
|
||||||
|
$debug = Nuh::$options['d'] ?? 0;
|
||||||
|
|
||||||
|
if ($debug) {
|
||||||
|
Notice::note('LoadTournaments, sport: ' . $sport_id);
|
||||||
|
}
|
||||||
|
|
||||||
$tornaments = SofaScoreTournament::select('name', 'tournament_id')->where('sport_id', $sport_id)->where('enabled', 1)->get();
|
$tornaments = SofaScoreTournament::select('name', 'tournament_id')->where('sport_id', $sport_id)->where('enabled', 1)->get();
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
"2")
|
"2")
|
||||||
# AUTO GRAPPER SOFASCORE (production no debug and 10s breaks)
|
# AUTO GRAPPER SOFASCORE (production no debug and 10s breaks)
|
||||||
|
echo "\n⚽ process function $1 sofa_score_task $2"
|
||||||
killall ssh
|
killall ssh
|
||||||
ssh -f -N -L 13306:127.0.0.1:3306 -p 58371 root@162.55.242.190
|
ssh -f -N -L 13306:127.0.0.1:3306 -p 58371 root@162.55.242.190
|
||||||
php artisan nuh --f 67 --fun=2 --task=$2
|
php artisan nuh --f 67 --fun=2 --task=$2
|
||||||
@@ -48,6 +49,7 @@ case "$1" in
|
|||||||
php artisan nuh --f 67 --fun=3 --task=$2
|
php artisan nuh --f 67 --fun=3 --task=$2
|
||||||
php artisan nuh --f 67 --fun=4 --task=$2
|
php artisan nuh --f 67 --fun=4 --task=$2
|
||||||
php artisan nuh --f 67 --fun=8 --task=$2
|
php artisan nuh --f 67 --fun=8 --task=$2
|
||||||
|
echo "\n😎 done :)"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#----------------------------------------
|
|
||||||
# MySQL Backup Script
|
|
||||||
#----------------------------------------
|
|
||||||
|
|
||||||
# 🔧 Configuration
|
|
||||||
HOST='localhost' # MySQL server host
|
|
||||||
USER='root' # Username
|
|
||||||
PASSWORD='salam' # Password
|
|
||||||
DB='nutzwerte_fi4'
|
|
||||||
DAYS_TO_KEEP=60 # Delete backups older than X days
|
|
||||||
GZIP=1 # 1 = gzip compression, 0 = plain .sql
|
|
||||||
BACKUP_PATH='/var/www/html/nutzwerte_fi4/storage/backup_database/archive' # Location to store backups
|
|
||||||
#TIMESTAMP=$(date +"%d_%m_%Y_%H_%M_%S") # Date-time for unique file names
|
|
||||||
TIMESTAMP=$(date -d "yesterday" +"%d_%m_%Y") #Date-time for previous date file names. reminder here crontab use after 12 am
|
|
||||||
|
|
||||||
#----------------------------------------
|
|
||||||
|
|
||||||
# Create the backup folder
|
|
||||||
if [ ! -d $BACKUP_PATH ]; then
|
|
||||||
mkdir -p $BACKUP_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Backup (with or without compression)
|
|
||||||
if [ "$GZIP" -eq 0 ]; then
|
|
||||||
echo "Backing up database: $DB (no compression)"
|
|
||||||
mysqldump -h "$HOST" -u "$USER" -p"$PASSWORD" --databases "$DB" --single-transaction --quick --extended-insert --compact --hex-blob --max-allowed-packet=256M --net-buffer-length=2M > "$BACKUP_PATH/${DB}-${TIMESTAMP}.sql"
|
|
||||||
else
|
|
||||||
echo "Backing up database: $DB (with compression)"
|
|
||||||
mysqldump -h "$HOST" -u "$USER" -p"$PASSWORD" --databases "$DB" --single-transaction --quick --extended-insert --compact --hex-blob --max-allowed-packet=256M --net-buffer-length=2M | gzip -9 -c > "$BACKUP_PATH/${DB}-${TIMESTAMP}.sql.gz"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Delete old backups
|
|
||||||
if [ "$DAYS_TO_KEEP" -gt 0 ] ; then
|
|
||||||
echo "Deleting backups older than $DAYS_TO_KEEP days"
|
|
||||||
find $BACKUP_PATH/* -mtime +$DAYS_TO_KEEP -exec rm {} \;
|
|
||||||
fi
|
|
||||||
Reference in new issue
Block a user