Compare commits

..

3 Commits

Author SHA1 Message Date
Samuele Locatelli 55faefcb9a Merge branch 'release/UpdateSlowTimerElapse' 2022-07-13 07:57:19 +02:00
Samuele Locatelli 1e5f894fd9 MON:
- attesa refresh variabile x client
- esclusione compilazione WASM (NON pronta)
2022-07-13 07:55:12 +02:00
Samuele Locatelli cf8baa054f Merge tag 'MonCleanup' into develop
Update con cleanup codice ed un paio di fix dispose
2022-07-12 19:06:59 +02:00
2 changed files with 113 additions and 109 deletions
+106 -105
View File
@@ -121,19 +121,19 @@ MON:build:
script: script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj - dotnet build $env:APP_NAME/$env:APP_NAME.csproj
WAMON:build: # WAMON:build:
stage: build # stage: build
tags: # tags:
- win # - win
variables: # variables:
PROJ_PATH: MP.WASM.Mon\Server # PROJ_PATH: MP.WASM.Mon\Server
APP_NAME: MP.WASM.Mon.Server # APP_NAME: MP.WASM.Mon.Server
SOL_NAME: MP-WAMON # SOL_NAME: MP-WAMON
before_script: # before_script:
- *nuget-fix # - *nuget-fix
- dotnet restore "$env:SOL_NAME.sln" # - dotnet restore "$env:SOL_NAME.sln"
script: # script:
- dotnet build $env:PROJ_PATH/$env:APP_NAME.csproj # - dotnet build $env:PROJ_PATH/$env:APP_NAME.csproj
LAND:test: LAND:test:
stage: test stage: test
@@ -199,22 +199,22 @@ MON:test:
script: script:
- dotnet test $env:APP_NAME/$env:APP_NAME.csproj - dotnet test $env:APP_NAME/$env:APP_NAME.csproj
WAMON:test: # WAMON:test:
stage: test # stage: test
tags: # tags:
- win # - win
variables: # variables:
PROJ_PATH: MP.WASM.Mon\Server # PROJ_PATH: MP.WASM.Mon\Server
APP_NAME: MP.WASM.Mon.Server # APP_NAME: MP.WASM.Mon.Server
SOL_NAME: MP-WAMON # SOL_NAME: MP-WAMON
before_script: # before_script:
- *nuget-fix # - *nuget-fix
- dotnet restore "$env:SOL_NAME.sln" # - dotnet restore "$env:SOL_NAME.sln"
only: # only:
- develop # - develop
needs: ["WAMON:build"] # needs: ["WAMON:build"]
script: # script:
- dotnet test $env:PROJ_PATH/$env:APP_NAME.csproj # - dotnet test $env:PROJ_PATH/$env:APP_NAME.csproj
LAND:IIS01:deploy: LAND:IIS01:deploy:
stage: deploy stage: deploy
@@ -280,22 +280,22 @@ MON:IIS01:deploy:
script: script:
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
WAMON:IIS01:deploy: # WAMON:IIS01:deploy:
stage: deploy # stage: deploy
tags: # tags:
- win # - win
variables: # variables:
PROJ_PATH: MP.WASM.Mon\Server # PROJ_PATH: MP.WASM.Mon\Server
APP_NAME: MP.WASM.Mon.Server # APP_NAME: MP.WASM.Mon.Server
SOL_NAME: MP-WAMON # SOL_NAME: MP-WAMON
before_script: # before_script:
- *nuget-fix # - *nuget-fix
- dotnet restore "$env:SOL_NAME.sln" # - dotnet restore "$env:SOL_NAME.sln"
only: # only:
- develop # - develop
needs: ["WAMON:test"] # needs: ["WAMON:test"]
script: # script:
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:PROJ_PATH/$env:APP_NAME.csproj # - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:PROJ_PATH/$env:APP_NAME.csproj
LAND:IIS02:deploy: LAND:IIS02:deploy:
stage: deploy stage: deploy
@@ -365,23 +365,23 @@ MON:IIS02:deploy:
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj - dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj - dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
WAMON:IIS02:deploy: # WAMON:IIS02:deploy:
stage: deploy # stage: deploy
tags: # tags:
- win # - win
variables: # variables:
PROJ_PATH: MP.WASM.Mon\Server # PROJ_PATH: MP.WASM.Mon\Server
APP_NAME: MP.WASM.Mon.Server # APP_NAME: MP.WASM.Mon.Server
SOL_NAME: MP-WAMON # SOL_NAME: MP-WAMON
before_script: # before_script:
- *nuget-fix # - *nuget-fix
- dotnet restore "$env:SOL_NAME.sln" # - dotnet restore "$env:SOL_NAME.sln"
only: # only:
- master # - master
needs: ["WAMON:build"] # needs: ["WAMON:build"]
script: # script:
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:PROJ_PATH/$env:APP_NAME.csproj # - dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:PROJ_PATH/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:PROJ_PATH/$env:APP_NAME.csproj # - dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:PROJ_PATH/$env:APP_NAME.csproj
LAND:installer: LAND:installer:
stage: installer stage: installer
@@ -467,27 +467,27 @@ MON:installer:
- *hashBuild - *hashBuild
- *nexusUpload - *nexusUpload
WAMON:installer: # WAMON:installer:
stage: installer # stage: installer
tags: # tags:
- win # - win
variables: # variables:
PROJ_PATH: MP.WASM.Mon\Server # PROJ_PATH: MP.WASM.Mon\Server
APP_NAME: MP.WASM.Mon.Server # APP_NAME: MP.WASM.Mon.Server
SOL_NAME: MP-WAMON # SOL_NAME: MP-WAMON
NEXUS_PATH: MP-WAMON # NEXUS_PATH: MP-WAMON
before_script: # before_script:
- *nuget-fix # - *nuget-fix
- dotnet restore "$env:SOL_NAME.sln" # - dotnet restore "$env:SOL_NAME.sln"
only: # only:
- develop # - develop
- master # - master
needs: ["WAMON:build"] # needs: ["WAMON:build"]
script: # script:
- dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:PROJ_PATH/$env:APP_NAME.csproj -o:publish # - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:PROJ_PATH/$env:APP_NAME.csproj -o:publish
# qui il deploy su nexus... # # qui il deploy su nexus...
- *hashBuild # - *hashBuild
- *nexusUpload # - *nexusUpload
LAND:release: LAND:release:
stage: release stage: release
@@ -583,25 +583,26 @@ MON:release:
script: script:
- dotnet publish -c Release -o ./publish $env:APP_NAME/$env:APP_NAME.csproj - dotnet publish -c Release -o ./publish $env:APP_NAME/$env:APP_NAME.csproj
WAMON:release: # WAMON:release:
stage: release # stage: release
tags: # tags:
- win # - win
variables: # variables:
PROJ_PATH: MP.WASM.Mon\Server # PROJ_PATH: MP.WASM.Mon\Server
APP_NAME: MP.WASM.Mon.Server # APP_NAME: MP.WASM.Mon.Server
SOL_NAME: MP-WAMON # SOL_NAME: MP-WAMON
NEXUS_PATH: MP-WAMON # NEXUS_PATH: MP-WAMON
before_script: # before_script:
- *nuget-fix # - *nuget-fix
- dotnet restore "$env:SOL_NAME.sln" # - dotnet restore "$env:SOL_NAME.sln"
only: # only:
- tags # - tags
except: # except:
- branches # - branches
needs: ["WAMON:build"] # needs: ["WAMON:build"]
artifacts: # artifacts:
paths: # paths:
- publish/ # - publish/
script: # script:
- dotnet publish -c Release -o ./publish $env:PROJ_PATH/$env:APP_NAME.csproj # - dotnet publish -c Release -o ./publish $env:PROJ_PATH/$env:APP_NAME.csproj
+7 -4
View File
@@ -61,7 +61,12 @@ namespace MP.Mon.Pages
protected int slowRefreshMs protected int slowRefreshMs
{ {
get => 1000 * slowRefreshSec; get
{
// tempo variabile tra +/- 10% del target
int answ = rnd.Next(900, 1100) * slowRefreshSec;
return answ;
}
} }
#endregion Protected Properties #endregion Protected Properties
@@ -166,12 +171,10 @@ namespace MP.Mon.Pages
private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private static System.Timers.Timer slowTimer = new System.Timers.Timer(300000); private static System.Timers.Timer slowTimer = new System.Timers.Timer(300000);
private List<ConfigModel>? CurrConfig = null; private List<ConfigModel>? CurrConfig = null;
private bool doBlink = false; private bool doBlink = false;
private List<MappaStatoExpl>? listMSE = null; private List<MappaStatoExpl>? listMSE = null;
private Random rnd = new Random();
#endregion Private Fields #endregion Private Fields