mirror of
https://bitbucket.org/anguist/ntpa
synced 2025-10-05 10:30:56 +00:00
Ensure pid file are deleted
This commit is contained in:
@ -50,6 +50,8 @@ namespace Ntp.Analyzer.Process
|
|||||||
private readonly string pidFile;
|
private readonly string pidFile;
|
||||||
|
|
||||||
public void Run()
|
public void Run()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
bool reload = true;
|
bool reload = true;
|
||||||
while (reload)
|
while (reload)
|
||||||
@ -70,7 +72,9 @@ namespace Ntp.Analyzer.Process
|
|||||||
|
|
||||||
LogFactory.Cleanup();
|
LogFactory.Cleanup();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
if (pidFile != null)
|
if (pidFile != null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -83,4 +87,5 @@ namespace Ntp.Analyzer.Process
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -43,7 +43,6 @@ namespace Ntp.Data.Provider
|
|||||||
#if MYSQL
|
#if MYSQL
|
||||||
return new MySqlFactory();
|
return new MySqlFactory();
|
||||||
#else
|
#else
|
||||||
// TODO: Ensure pid file are deleted
|
|
||||||
throw new ApplicationException("NTP Analyzer was not build wit MySQL support.");
|
throw new ApplicationException("NTP Analyzer was not build wit MySQL support.");
|
||||||
#endif
|
#endif
|
||||||
case SqlDatabaseProvider.PostgreSql:
|
case SqlDatabaseProvider.PostgreSql:
|
||||||
|
Reference in New Issue
Block a user