- Add the time-zone in the logs.

- Code polishing.
This commit is contained in:
Lampros Smyrnaios 2023-05-11 03:14:56 +03:00
parent 29a54f0b30
commit 714938531b
3 changed files with 4 additions and 4 deletions

View File

@ -23,6 +23,7 @@ public class ScheduledTasks {
if ( AssignmentsHandler.hadConnectionErrorOnRequest ) {
if ( GeneralController.shouldShutdownWorker ) // Make sure the worker shuts-down, in case the user sends the relevant request, while the worker is stuck in a data-request error-loop.
// TODO - Should this worker inform the Controller that will shutdown?
// TODO - Yes, apart from this knowledge, it may be the case that we make the Controller to request the Workers to shutdown.
UrlsWorkerApplication.gentleAppShutdown();
try {
Thread.sleep(900_000); // Sleep for 15 mins to stall the scheduler from retrying right away, thus giving time to the Controller to recover.

View File

@ -171,9 +171,8 @@ public class FullTextsController {
public static boolean deleteFile(String fileFullPathString)
{
File currentFile = new File(fileFullPathString);
try {
FileDeleteStrategy.FORCE.delete(currentFile);
FileDeleteStrategy.FORCE.delete(new File(fileFullPathString));
} catch (IOException e) {
logger.error("Error when deleting the file: " + fileFullPathString);
return false;

View File

@ -15,14 +15,14 @@
</triggeringPolicy>
<encoder>
<charset>UTF-8</charset>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36}.%M\(@%line\) - %msg%n</pattern>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS z} [%thread] %-5level %logger{36}.%M\(@%line\) - %msg%n</pattern>
</encoder>
</appender>
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<charset>UTF-8</charset>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %highlight(%-5level) %cyan(%logger{36}.%M\(@%line\)) - %msg%n</pattern>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS z} [%thread] %highlight(%-5level) %cyan(%logger{36}.%M\(@%line\)) - %msg%n</pattern>
</encoder>
</appender>