Skip to content

Commit 4be1703

Browse files
feat: updating versions (#45)
1 parent c49e92b commit 4be1703

File tree

7 files changed

+47
-17
lines changed

7 files changed

+47
-17
lines changed

Diff for: jdbc/shedlock/pom.xml

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
23
<modelVersion>4.0.0</modelVersion>
34
<parent>
45
<groupId>tech.ydb.jdbc.examples</groupId>
@@ -12,8 +13,9 @@
1213
<properties>
1314
<maven.compiler.release>17</maven.compiler.release>
1415
<kotlin.version>1.9.22</kotlin.version>
15-
<shed.lock.ydb>0.1.0</shed.lock.ydb>
16+
<shed.lock.ydb>0.3.0</shed.lock.ydb>
1617
<spring.boot.version>3.1.2</spring.boot.version>
18+
<liquibase.ydb.dialect.version>1.1.0</liquibase.ydb.dialect.version>
1719
</properties>
1820
<dependencyManagement>
1921
<dependencies>
@@ -32,10 +34,6 @@
3234
<artifactId>shedlock-spring</artifactId>
3335
<version>4.27.0</version>
3436
</dependency>
35-
<dependency>
36-
<groupId>org.springframework.boot</groupId>
37-
<artifactId>spring-boot-starter-web</artifactId>
38-
</dependency>
3937
<dependency>
4038
<groupId>org.springframework.boot</groupId>
4139
<artifactId>spring-boot-autoconfigure</artifactId>
@@ -48,6 +46,15 @@
4846
<groupId>org.springframework.boot</groupId>
4947
<artifactId>spring-boot-starter-jdbc</artifactId>
5048
</dependency>
49+
<dependency>
50+
<groupId>tech.ydb.dialects</groupId>
51+
<artifactId>liquibase-ydb-dialect</artifactId>
52+
<version>${liquibase.ydb.dialect.version}</version>
53+
</dependency>
54+
<dependency>
55+
<groupId>org.liquibase</groupId>
56+
<artifactId>liquibase-core</artifactId>
57+
</dependency>
5158
<dependency>
5259
<groupId>org.jetbrains.kotlin</groupId>
5360
<artifactId>kotlin-reflect</artifactId>
@@ -70,7 +77,6 @@
7077
</dependencies>
7178
<build>
7279
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
73-
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
7480
<plugins>
7581
<plugin>
7682
<groupId>org.apache.maven.plugins</groupId>
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
package tech.ydb.shaded.lock
22

3-
import jakarta.annotation.PostConstruct
43
import net.javacrumbs.shedlock.spring.annotation.SchedulerLock
5-
import org.springframework.beans.factory.annotation.Autowired
64
import org.springframework.scheduling.annotation.Scheduled
75
import org.springframework.stereotype.Component
8-
import tech.ydb.lock.provider.YdbCoordinationServiceLockProvider
9-
106

117
/**
128
* @author Kirill Kurdyukov
@@ -15,12 +11,16 @@ import tech.ydb.lock.provider.YdbCoordinationServiceLockProvider
1511
class JobHandler {
1612

1713
@Scheduled(cron = "* * * * * *")
18-
@SchedulerLock(name = "YDB Some Job", lockAtLeastFor = "15S", lockAtMostFor = "20S")
14+
@SchedulerLock(name = "YDB Some Job", lockAtMostFor = "10S")
1915
fun awesomeJob() {
16+
println("PID LEADER: " + ProcessHandle.current().pid())
17+
2018
for (i in 0..4) {
2119
println("Processing {$i}")
2220

2321
Thread.sleep(1_000)
2422
}
23+
24+
println("STOP LEADER")
2525
}
2626
}
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
spring.datasource.url=jdbc:ydb:grpc://localhost:2136/local
22
spring.datasource.driver-class-name=tech.ydb.jdbc.YdbDriver
3-
server.port=81
3+
4+
spring.liquibase.change-log=classpath:changelog.xml

Diff for: jdbc/shedlock/src/main/resources/changelog.xml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<databaseChangeLog
2+
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
5+
6+
<changeSet author="KurdyukovKirill" id="1">
7+
<createTable tableName="shedlock">
8+
<column name="name" type="VARCHAR(64)">
9+
<constraints nullable="false" primaryKey="true"/>
10+
</column>
11+
<column name="lock_until" type="TIMESTAMP">
12+
<constraints nullable="false"/>
13+
</column>
14+
<column name="locked_at" type="TIMESTAMP">
15+
<constraints nullable="false"/>
16+
</column>
17+
<column name="locked_by" type="VARCHAR(255)">
18+
<constraints nullable="false"/>
19+
</column>
20+
</createTable>
21+
</changeSet>
22+
23+
</databaseChangeLog>

Diff for: jdbc/spring-data-jdbc/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<properties>
2323
<maven.compiler.release>17</maven.compiler.release>
2424
<kotlin.version>1.9.22</kotlin.version>
25-
<spring.data.jdbc.ydb.version>0.9.1</spring.data.jdbc.ydb.version>
25+
<spring.data.jdbc.ydb.version>1.0.0</spring.data.jdbc.ydb.version>
2626
<spring.boot.version>3.2.1</spring.boot.version>
2727
<flyway.version>10.7.1</flyway.version>
2828
</properties>

Diff for: jdbc/spring-data-jpa/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<properties>
1313
<maven.compiler.release>17</maven.compiler.release>
1414
<kotlin.version>1.9.22</kotlin.version>
15-
<hibernate.ydb.dialect.version>1.0.0</hibernate.ydb.dialect.version>
15+
<hibernate.ydb.dialect.version>1.4.0</hibernate.ydb.dialect.version>
1616
<spring.boot.version>3.2.1</spring.boot.version>
1717
</properties>
1818
<dependencies>

Diff for: jdbc/spring-liquibase-app/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<kotlin.version>1.9.22</kotlin.version>
1515
<hibernate.ydb.dialect.version>0.9.2</hibernate.ydb.dialect.version>
1616
<spring.boot.version>3.2.1</spring.boot.version>
17-
<liquibase.ydb.dialect.version>0.9.1</liquibase.ydb.dialect.version>
17+
<liquibase.ydb.dialect.version>1.1.0</liquibase.ydb.dialect.version>
1818
<liquibase.core.version>4.24.0</liquibase.core.version>
1919
</properties>
2020
<dependencies>
@@ -50,7 +50,7 @@
5050
<dependency>
5151
<groupId>tech.ydb.dialects</groupId>
5252
<artifactId>liquibase-ydb-dialect</artifactId>
53-
<version>0.9.7</version>
53+
<version>${liquibase.ydb.dialect.version}</version>
5454
</dependency>
5555
<dependency>
5656
<groupId>org.liquibase</groupId>

0 commit comments

Comments
 (0)