commit
b3e82c5c65
2 changed files with 10 additions and 9 deletions
|
|
@ -1,6 +1,4 @@
|
||||||
. .\..\includes\ps1\lockfile.ps1
|
Start-Transcript -Path '/var/log/dtch/report_new_matches.log' -Append
|
||||||
|
|
||||||
new-lock
|
|
||||||
|
|
||||||
if ($PSScriptRoot.length -eq 0) {
|
if ($PSScriptRoot.length -eq 0) {
|
||||||
$scriptroot = Get-Location
|
$scriptroot = Get-Location
|
||||||
|
|
@ -8,6 +6,8 @@ if ($PSScriptRoot.length -eq 0) {
|
||||||
else {
|
else {
|
||||||
$scriptroot = $PSScriptRoot
|
$scriptroot = $PSScriptRoot
|
||||||
}
|
}
|
||||||
|
. $scriptroot\..\includes\ps1\lockfile.ps1
|
||||||
|
new-lock
|
||||||
|
|
||||||
$fileContent = Get-Content -Path "$scriptroot/../config/config.php" -Raw
|
$fileContent = Get-Content -Path "$scriptroot/../config/config.php" -Raw
|
||||||
|
|
||||||
|
|
@ -170,3 +170,4 @@ $newJson = $player_matches | ConvertTo-Json -Depth 100
|
||||||
$newJson | out-file "$scriptroot/../data/player_matches.json"
|
$newJson | out-file "$scriptroot/../data/player_matches.json"
|
||||||
|
|
||||||
remove-lock
|
remove-lock
|
||||||
|
Stop-Transcript
|
||||||
|
|
@ -1,7 +1,4 @@
|
||||||
|
Start-Transcript -Path '/var/log/report_new_matches.log' -Append
|
||||||
. .\..\includes\ps1\lockfile.ps1
|
|
||||||
|
|
||||||
new-lock
|
|
||||||
|
|
||||||
if ($PSScriptRoot.length -eq 0) {
|
if ($PSScriptRoot.length -eq 0) {
|
||||||
$scriptroot = Get-Location
|
$scriptroot = Get-Location
|
||||||
|
|
@ -9,6 +6,8 @@ if ($PSScriptRoot.length -eq 0) {
|
||||||
else {
|
else {
|
||||||
$scriptroot = $PSScriptRoot
|
$scriptroot = $PSScriptRoot
|
||||||
}
|
}
|
||||||
|
. $scriptroot\..\includes\ps1\lockfile.ps1
|
||||||
|
new-lock
|
||||||
function IsValidEntry($entry) {
|
function IsValidEntry($entry) {
|
||||||
return ($entry.KD_H -ne 'NaN' -and $entry.KD_ALL -ne 'NaN') -and
|
return ($entry.KD_H -ne 'NaN' -and $entry.KD_ALL -ne 'NaN') -and
|
||||||
($entry.KD_H -ne 'Infinity' -and $entry.KD_ALL -ne 'Infinity')
|
($entry.KD_H -ne 'Infinity' -and $entry.KD_ALL -ne 'Infinity')
|
||||||
|
|
@ -100,3 +99,4 @@ $payload = [PSCustomObject]@{
|
||||||
|
|
||||||
Invoke-RestMethod -Uri $webhookurl -Method Post -Body ($payload | ConvertTo-Json) -ContentType 'Application/Json'
|
Invoke-RestMethod -Uri $webhookurl -Method Post -Body ($payload | ConvertTo-Json) -ContentType 'Application/Json'
|
||||||
remove-lock
|
remove-lock
|
||||||
|
Stop-Transcript
|
||||||
Loading…
Add table
Add a link
Reference in a new issue