s
This commit is contained in:
parent
c590becf0a
commit
38bd9ae1df
7 changed files with 18 additions and 7 deletions
|
|
@ -7,7 +7,7 @@ else {
|
|||
$scriptroot = $PSScriptRoot
|
||||
}
|
||||
. $scriptroot\..\includes\ps1\lockfile.ps1
|
||||
new-lock
|
||||
new-lock -by "report_new_matches"
|
||||
|
||||
$fileContent = Get-Content -Path "$scriptroot/../config/config.php" -Raw
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ else {
|
|||
$scriptroot = $PSScriptRoot
|
||||
}
|
||||
. $scriptroot\..\includes\ps1\lockfile.ps1
|
||||
new-lock
|
||||
new-lock -by "report_to_discord"
|
||||
function IsValidEntry($entry) {
|
||||
return ($entry.KD_H -ne 'NaN' -and $entry.KD_ALL -ne 'NaN') -and
|
||||
($entry.KD_H -ne 'Infinity' -and $entry.KD_ALL -ne 'Infinity')
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
function new-lock {
|
||||
[CmdletBinding()]
|
||||
param (
|
||||
[Parameter()]
|
||||
[string]
|
||||
$by
|
||||
)
|
||||
Write-Output 'Setting lock'
|
||||
$lock = $true
|
||||
$timeout = 10
|
||||
|
|
@ -23,6 +29,9 @@ function new-lock {
|
|||
$i++
|
||||
}
|
||||
New-Item -ItemType File -Path $lockFile | Out-Null
|
||||
if ($by) {
|
||||
$by | Out-File -FilePath $lockFile -Append
|
||||
}
|
||||
|
||||
}
|
||||
function remove-lock {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ else {
|
|||
}
|
||||
|
||||
. $scriptroot\..\includes\ps1\lockfile.ps1
|
||||
new-lock
|
||||
new-lock -by "get_matches"
|
||||
|
||||
# Read the content of the file as a single string
|
||||
$fileContent = Get-Content -Path "$scriptroot/../config/config.php" -Raw
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ else {
|
|||
}
|
||||
|
||||
. $scriptroot\..\includes\ps1\lockfile.ps1
|
||||
new-lock
|
||||
new-lock -by "matchparser"
|
||||
##SETTINGS
|
||||
$monthsback = -1 # how many months back to look for matches
|
||||
##END OF SETTINGS
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
. .\..\includes\ps1\lockfile.ps1
|
||||
|
||||
|
||||
|
||||
new-lock
|
||||
if($PSScriptRoot.length -eq 0){
|
||||
$scriptroot = Get-Location
|
||||
}else{
|
||||
$scriptroot = $PSScriptRoot
|
||||
}
|
||||
. $scriptroot\..\includes\ps1\lockfile.ps1
|
||||
new-lock -by "update_clan"
|
||||
# Read the content of the file as a single string
|
||||
$fileContent = Get-Content -Path "$scriptroot/../config/config.php" -Raw
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ else {
|
|||
}
|
||||
|
||||
. $scriptroot\..\includes\ps1\lockfile.ps1
|
||||
new-lock
|
||||
new-lock -by "update_clan_members"
|
||||
|
||||
# Read the content of the file as a single string
|
||||
$fileContent = Get-Content -Path "$scriptroot/../config/config.php" -Raw
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue