risemplificata data...
This commit is contained in:
Vendored
+1
-1
@@ -10,7 +10,7 @@ pipeline {
|
||||
steps {
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=646']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=647']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '3.2.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '3.2.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.APP_NAME = 'SteamWareLib'
|
||||
|
||||
+11
-32
@@ -231,10 +231,7 @@ namespace SteamWare
|
||||
{
|
||||
// se è in cache
|
||||
if (isInCacheObject("lastUpdateAppConf"))
|
||||
{
|
||||
// faccio SEMPRE calcolo esatto sennò sbaglia...
|
||||
CultureInfo provider = CultureInfo.InvariantCulture;
|
||||
string format = "yyyy-MM-dd HH:mm:ss";
|
||||
{
|
||||
redVal = objCacheObj("lastUpdateAppConf").ToString();
|
||||
try
|
||||
{
|
||||
@@ -242,7 +239,10 @@ namespace SteamWare
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
answ = DateTime.ParseExact(redVal, format, provider);
|
||||
// metto un valore a caso tra 0 e 5 minuti fa...
|
||||
Random rnd = new Random();
|
||||
int delta = rnd.Next(1, 6); // creates a number between 1 and 5
|
||||
answ = DateTime.Now.AddSeconds(-delta);
|
||||
logger.lg.scriviLog(string.Format("Errore convert, tento ParseExact lastUpdateAppConf ({0}){1}{2}", redVal, Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
}
|
||||
@@ -255,12 +255,9 @@ namespace SteamWare
|
||||
}
|
||||
set
|
||||
{
|
||||
// faccio SEMPRE calcolo esatto sennò sbaglia...
|
||||
CultureInfo provider = CultureInfo.InvariantCulture;
|
||||
string format = "yyyy-MM-dd HH:mm:ss";
|
||||
string valore = value.ToString(format, provider);
|
||||
// ora salvo!
|
||||
setCacheVal("lastUpdateAppConf", valore, true);
|
||||
string redVal = value.ToString();
|
||||
setCacheVal("lastUpdateAppConf", value, true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1013,14 +1010,7 @@ namespace SteamWare
|
||||
// ...se uso redis...
|
||||
if (cacheOnRedis)
|
||||
{
|
||||
answ = getRSV(redHash(nomeVar));
|
||||
#if false
|
||||
string valSer = getRSV(redHash(nomeVar));
|
||||
if (valSer != "" && valSer != null)
|
||||
{
|
||||
answ = JsonConvert.DeserializeObject(valSer);
|
||||
}
|
||||
#endif
|
||||
answ = getRSV(redHash(nomeVar));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1097,12 +1087,7 @@ namespace SteamWare
|
||||
{
|
||||
bool _done = false;
|
||||
if (cacheOnRedis)
|
||||
{
|
||||
#if false
|
||||
// serializzo
|
||||
string serVal = JsonConvert.SerializeObject(valore);
|
||||
setRSV(redHash(nomeVar), serVal);
|
||||
#endif
|
||||
{
|
||||
setRSV(redHash(nomeVar), valore.ToString());
|
||||
_done = true;
|
||||
}
|
||||
@@ -1224,10 +1209,7 @@ namespace SteamWare
|
||||
{
|
||||
var cacheVal = objCacheObj("tabelleInCache");
|
||||
if (cacheVal != null)
|
||||
{
|
||||
#if false
|
||||
answ = (Dictionary<string, string>)cacheVal;
|
||||
#endif
|
||||
{
|
||||
answ = JsonConvert.DeserializeObject<Dictionary<string, string>>(cacheVal.ToString());
|
||||
}
|
||||
}
|
||||
@@ -1240,10 +1222,7 @@ namespace SteamWare
|
||||
set
|
||||
{
|
||||
string serVal = JsonConvert.SerializeObject(value);
|
||||
setCacheVal("tabelleInCache", serVal);
|
||||
#if false
|
||||
setCacheVal("tabelleInCache", value);
|
||||
#endif
|
||||
setCacheVal("tabelleInCache", serVal);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user