# Conflicts:
#	pom.xml
#	src/main/java/org/ccalm/weather/AirTemperature.java
#	src/main/java/org/ccalm/weather/SoilTmperature.java
This commit is contained in:
2024-07-08 12:38:03 +05:00
3 changed files with 27 additions and 1 deletions

View File

@ -256,6 +256,13 @@ public class Precipitation implements ServletContextAware {
logger.error("N6:"+ex.getMessage(),ex);
}
logger.info("Delete old data 3");
try {
String sql="delete from main.precipitation_dates where date=cast(to_timestamp('"+date+" "+time+"', 'YYYYMMDD HH24') as timestamp without time zone) and hours="+forecast;
st.executeUpdate(sql);
} catch (SQLException ex) {
logger.info(ex.getMessage());
}
System.out.println("Delete old data 3");
try {
String sql="delete from main.precipitation where date<=CURRENT_DATE-'730 days'::INTERVAL";
st.executeUpdate(sql);

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="INFO">
<Appenders>
<!-- Ротирующий файловый аппендер -->
<RollingFile name="RollingFile" fileName="logs/application.log"
filePattern="logs/application-%d{MM-dd-yyyy}-%i.log.gz">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
<Policies>
<SizeBasedTriggeringPolicy size="100 MB"/>
</Policies>
<DefaultRolloverStrategy max="10"/>
</RollingFile>
</Appenders>
<Loggers>
<Root level="ALL">
<AppenderRef ref="RollingFile"/>
</Root>
</Loggers>
</Configuration>