diff --git a/slackjudge/logs/batch.log b/slackjudge/logs/batch.log new file mode 100644 index 0000000..e924c46 --- /dev/null +++ b/slackjudge/logs/batch.log @@ -0,0 +1,152 @@ +2025-12-15 17:10:44 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode +2025-12-15 17:10:44 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data JDBC repositories in DEFAULT mode. +2025-12-15 17:10:44 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data JDBC - Could not safely identify store assignment for repository candidate interface store.slackjudge.batch.infra.mongo.repository.UserSolvedSnapShotRepository; If you want this repository to be a JDBC repository, consider annotating your entities with one of these annotations: org.springframework.data.relational.core.mapping.Table. +2025-12-15 17:10:44 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 24 ms. Found 0 JDBC repository interfaces. +2025-12-15 17:10:44 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode +2025-12-15 17:10:44 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2025-12-15 17:10:44 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data JPA - Could not safely identify store assignment for repository candidate interface store.slackjudge.batch.infra.mongo.repository.UserSolvedSnapShotRepository; If you want this repository to be a JPA repository, consider annotating your entities with one of these annotations: jakarta.persistence.Entity, jakarta.persistence.MappedSuperclass (preferred), or consider extending one of the following types with your repository: org.springframework.data.jpa.repository.JpaRepository +2025-12-15 17:10:44 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 4 ms. Found 0 JPA repository interfaces. +2025-12-15 17:10:44 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode +2025-12-15 17:10:44 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data MongoDB repositories in DEFAULT mode. +2025-12-15 17:10:44 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 88 ms. Found 1 MongoDB repository interface. +2025-12-15 17:10:45 [Test worker] INFO o.s.o.j.p.SpringPersistenceUnitInfo - No LoadTimeWeaver setup: ignoring JPA class transformer +2025-12-15 17:10:49 [Test worker] WARN org.hibernate.orm.deprecation - HHH90000025: PostgreSQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default) +2025-12-15 17:10:49 [Test worker] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit 'default' +2025-12-15 17:10:50 [Test worker] DEBUG org.mongodb.driver.connection - Connection pool created for localhost:27017 using options maxIdleTimeMS=0, minPoolSize=0, maxPoolSize=100, maxConnecting=2, waitQueueTimeoutMS=120000 +2025-12-15 17:10:50 [cluster-ClusterId{value='693fc28a58416b7585e8b001', description='null'}-localhost:27017] DEBUG org.mongodb.driver.connection - Connection pool ready for localhost:27017 +2025-12-15 17:10:50 [Test worker] WARN o.s.b.a.o.j.JpaBaseConfiguration$JpaWebConfiguration - spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning +2025-12-15 17:10:51 [Test worker] INFO o.s.b.c.l.s.TaskExecutorJobLauncher - Job: [SimpleJob: [name=slackJudge]] launched with the following parameters: [{'batchTime':'{value=2025-12-15T17:10:51.309046, type=class java.time.LocalDateTime, identifying=true}'}] +2025-12-15 17:10:51 [Test worker] INFO o.s.batch.core.job.SimpleStepHandler - Executing step: [LoadAllUsersStep] +2025-12-15 17:10:51 [Test worker] INFO o.s.batch.core.step.AbstractStep - Step: [LoadAllUsersStep] executed in 15ms +2025-12-15 17:10:51 [Test worker] INFO o.s.batch.core.job.SimpleStepHandler - Executing step: [LoadSnapshotStep] +2025-12-15 17:10:51 [Test worker] INFO o.s.batch.core.step.AbstractStep - Step: [LoadSnapshotStep] executed in 38ms +2025-12-15 17:10:51 [Test worker] INFO o.s.batch.core.job.SimpleStepHandler - Executing step: [FetchSolvedAcUserInfoStep] +2025-12-15 17:10:51 [Test worker] INFO o.s.batch.core.step.AbstractStep - Step: [FetchSolvedAcUserInfoStep] executed in 4ms +2025-12-15 17:10:51 [Test worker] INFO o.s.batch.core.job.SimpleStepHandler - Executing step: [detectAndUpdateUserTierAndProblemStep] +2025-12-15 17:10:51 [Test worker] INFO o.s.batch.core.step.AbstractStep - Step: [detectAndUpdateUserTierAndProblemStep] executed in 5ms +2025-12-15 17:10:51 [Test worker] INFO o.s.batch.core.job.SimpleStepHandler - Executing step: [saveSnapshotStep] +2025-12-15 17:10:51 [Test worker] INFO o.s.batch.core.step.AbstractStep - Step: [saveSnapshotStep] executed in 4ms +2025-12-15 17:10:51 [Test worker] INFO o.s.b.c.l.s.TaskExecutorJobLauncher - Job: [SimpleJob: [name=slackJudge]] completed with the following parameters: [{'batchTime':'{value=2025-12-15T17:10:51.309046, type=class java.time.LocalDateTime, identifying=true}'}] and the following status: [COMPLETED] in 250ms +2025-12-15 17:10:51 [SpringApplicationShutdownHook] DEBUG org.mongodb.driver.connection - Connection pool closed for localhost:27017 +2025-12-15 17:10:51 [SpringApplicationShutdownHook] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default' +2025-12-15 17:11:15 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode +2025-12-15 17:11:15 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data MongoDB repositories in DEFAULT mode. +2025-12-15 17:11:15 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 146 ms. Found 1 MongoDB repository interface. +2025-12-15 17:11:16 [Test worker] DEBUG org.mongodb.driver.connection - Connection pool created for localhost:27017 using options maxIdleTimeMS=0, minPoolSize=0, maxPoolSize=100, maxConnecting=2, waitQueueTimeoutMS=120000 +2025-12-15 17:11:16 [cluster-ClusterId{value='693fc2a4db724850dd768ec9', description='null'}-localhost:27017] DEBUG org.mongodb.driver.connection - Connection pool ready for localhost:27017 +2025-12-15 17:11:17 [Test worker] DEBUG o.s.data.mongodb.core.MongoTemplate - Saving Document containing fields: [_id, problems_ids, solved_count, tier, rating, user_id, _class] +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.connection - Checkout started for connection to localhost:27017 +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.connection - Connection created: address=localhost:27017, driver-generated ID=3 +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.connection - Connection ready: address=localhost:27017, driver-generated ID=3, established in=1 ms +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.connection - Connection checked out: address=localhost:27017, driver-generated ID=3, duration=4 ms +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.protocol.command - Command "update" started on database "snapshot" using a connection with driver-generated ID 3 and server-generated ID 159 to localhost:27017. The request ID is 5 and the operation ID is 5. Command: {"update": "snapshot", "ordered": true, "$db": "snapshot", "lsid": {"id": {"$binary": {"base64": "FKdgpw/bQQC+LDgGU/zB9w==", "subType": "04"}}}, "updates": [{"q": {"_id": {"bojId": "test", "snapShotAt": {"$date": "2025-12-15T08:00:00Z"}}}, "u": {"_id": {"bojId": "test", "snapShotAt": {"$date": "2025-12-15T08:00:00Z"}}, "problems_ids": [], "solved_count": 33, "tier": 23, "rating": 100, "user_id": 123, "_class": "store.slackjudge.batch.infra.mongo.document.UserSolvedSnapShotDocument"}, "upsert": true}]} +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.protocol.command - Command "update" succeeded on database "snapshot" in 36.284458 ms using a connection with driver-generated ID 3 and server-generated ID 159 to localhost:27017. The request ID is 5 and the operation ID is 5. Command reply: {"n": 1, "upserted": [{"index": 0, "_id": {"bojId": "test", "snapShotAt": {"$date": "2025-12-15T08:00:00Z"}}}], "nModified": 0, "ok": 1.0} +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.connection - Connection checked in: address=localhost:27017, driver-generated ID=3 +2025-12-15 17:11:17 [Test worker] DEBUG o.s.data.mongodb.core.MongoTemplate - find using query: { "_id.bojId" : "test", "_id.snapShotAt" : { "$date" : "2025-12-15T08:00:00Z"}} fields: Document{{}} sort: { "_id.bojId" : "test", "_id.snapShotAt" : { "$java" : 2025-12-15T17:00 } } for class: class store.slackjudge.batch.infra.mongo.document.UserSolvedSnapShotDocument in collection: snapshot +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.connection - Checkout started for connection to localhost:27017 +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.connection - Connection checked out: address=localhost:27017, driver-generated ID=3, duration=0 ms +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.protocol.command - Command "find" started on database "snapshot" using a connection with driver-generated ID 3 and server-generated ID 159 to localhost:27017. The request ID is 6 and the operation ID is 6. Command: {"find": "snapshot", "filter": {"_id.bojId": "test", "_id.snapShotAt": {"$date": "2025-12-15T08:00:00Z"}}, "limit": 2, "$db": "snapshot", "lsid": {"id": {"$binary": {"base64": "FKdgpw/bQQC+LDgGU/zB9w==", "subType": "04"}}}} +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.protocol.command - Command "find" succeeded on database "snapshot" in 8.679292 ms using a connection with driver-generated ID 3 and server-generated ID 159 to localhost:27017. The request ID is 6 and the operation ID is 6. Command reply: {"cursor": {"firstBatch": [{"_id": {"bojId": "test", "snapShotAt": {"$date": "2025-12-15T08:00:00Z"}}, "problems_ids": [], "solved_count": 33, "tier": 23, "rating": 100, "user_id": 123, "_class": "store.slackjudge.batch.infra.mongo.document.UserSolvedSnapShotDocument"}], "id": 0, "ns": "snapshot.snapshot"}, "ok": 1.0} +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.connection - Connection checked in: address=localhost:27017, driver-generated ID=3 +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.connection - Checkout started for connection to localhost:27017 +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.connection - Connection checked out: address=localhost:27017, driver-generated ID=3, duration=0 ms +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.protocol.command - Command "endSessions" started on database "admin" using a connection with driver-generated ID 3 and server-generated ID 159 to localhost:27017. The request ID is 7 and the operation ID is 1. Command: {"endSessions": [{"id": {"$binary": {"base64": "FKdgpw/bQQC+LDgGU/zB9w==", "subType": "04"}}}], "$db": "admin", "$readPreference": {"mode": "primaryPreferred"}} +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.protocol.command - Command "endSessions" succeeded on database "admin" in 1.354458 ms using a connection with driver-generated ID 3 and server-generated ID 159 to localhost:27017. The request ID is 7 and the operation ID is 1. Command reply: {"ok": 1.0} +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.connection - Connection checked in: address=localhost:27017, driver-generated ID=3 +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.connection - Connection closed: address=localhost:27017, driver-generated ID=3. Reason: Connection pool was closed. +2025-12-15 17:11:17 [Test worker] DEBUG org.mongodb.driver.connection - Connection pool closed for localhost:27017 +2025-12-15 17:11:17 [Test worker] WARN s.s.b.i.s.c.AbstractSolvedAcApiClient - [calling solved.ac API] request failed attempt = 1/3 +2025-12-15 17:11:17 [Test worker] WARN s.s.b.i.s.c.AbstractSolvedAcApiClient - [calling solved.ac API] request failed attempt = 2/3 +2025-12-15 17:11:17 [Test worker] ERROR s.s.b.i.s.c.AbstractSolvedAcApiClient - [calling solved.ac API] retry all failed +2025-12-15 17:11:17 [Test worker] WARN s.s.b.i.s.c.AbstractSolvedAcApiClient - [calling solved.ac API] request failed attempt = 1/3 +2025-12-15 17:11:17 [Test worker] WARN s.s.b.i.s.c.AbstractSolvedAcApiClient - [calling solved.ac API] request failed attempt = 2/3 +2025-12-15 17:11:18 [Test worker] ERROR s.s.b.i.s.c.SolvedAcProblemInfoClient - [calling solved.ac API] fetch problemInfo api json parsing error : Unexpected character (',' (code 44)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false') + at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 2, column: 13] +2025-12-15 17:11:18 [Test worker] ERROR s.s.b.i.s.c.SolvedAcProblemInfoClient - [calling solved.ac API] fetch problemInfo api json parsing error : Cannot deserialize value of type `java.util.ArrayList` from Integer value (token `JsonToken.VALUE_NUMBER_INT`) + at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 2, column: 13] (through reference chain: store.slackjudge.batch.infra.solvedac.dto.ProblemSearchResponse["items"]) +2025-12-15 17:11:18 [Test worker] WARN s.s.b.i.s.c.SolvedAcProblemInfoClient - [invalid page value] max page value : 689 min page value : 1 now page value : -1 +2025-12-15 17:11:18 [Test worker] WARN s.s.b.i.s.c.SolvedAcProblemInfoClient - [invalid page value] max page value : 689 min page value : 1 now page value : 700 +2025-12-15 17:11:18 [Test worker] ERROR s.s.b.i.s.c.SolvedAcUserInfoClient - [calling solved.ac API] fetch userInfo api json parsing error : Unexpected character (',' (code 44)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false') + at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 2, column: 13] +2025-12-15 17:11:18 [Test worker] ERROR s.s.b.i.s.c.SolvedAcUserInfoClient - [calling solved.ac API] fetch userInfo api json parsing error : Unexpected end-of-input within/between Object entries + at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 4, column: 1] +2025-12-15 17:11:26 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode +2025-12-15 17:11:26 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2025-12-15 17:11:26 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data JPA - Could not safely identify store assignment for repository candidate interface store.slackjudge.batch.infra.mongo.repository.UserSolvedSnapShotRepository; If you want this repository to be a JPA repository, consider annotating your entities with one of these annotations: jakarta.persistence.Entity, jakarta.persistence.MappedSuperclass (preferred), or consider extending one of the following types with your repository: org.springframework.data.jpa.repository.JpaRepository +2025-12-15 17:11:26 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 28 ms. Found 0 JPA repository interfaces. +2025-12-15 17:11:27 [Test worker] INFO o.s.o.j.p.SpringPersistenceUnitInfo - No LoadTimeWeaver setup: ignoring JPA class transformer +2025-12-15 17:11:30 [Test worker] WARN org.hibernate.orm.deprecation - HHH90000025: PostgreSQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default) +2025-12-15 17:11:31 [Test worker] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit 'default' +2025-12-15 17:11:32 [Test worker] INFO o.s.t.c.s.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [store.slackjudge.batch.repository.UserJdbcRepositoryTest]: UserJdbcRepositoryTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-12-15 17:11:32 [Test worker] INFO o.s.b.t.c.SpringBootTestContextBootstrapper - Found @SpringBootConfiguration store.slackjudge.batch.SlackjudgeApplication for test class store.slackjudge.batch.repository.UserJdbcRepositoryTest +2025-12-15 17:11:32 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode +2025-12-15 17:11:32 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2025-12-15 17:11:32 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data JPA - Could not safely identify store assignment for repository candidate interface store.slackjudge.batch.infra.mongo.repository.UserSolvedSnapShotRepository; If you want this repository to be a JPA repository, consider annotating your entities with one of these annotations: jakarta.persistence.Entity, jakarta.persistence.MappedSuperclass (preferred), or consider extending one of the following types with your repository: org.springframework.data.jpa.repository.JpaRepository +2025-12-15 17:11:32 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 5 ms. Found 0 JPA repository interfaces. +2025-12-15 17:11:32 [Test worker] INFO o.s.o.j.p.SpringPersistenceUnitInfo - No LoadTimeWeaver setup: ignoring JPA class transformer +2025-12-15 17:11:33 [Test worker] WARN org.hibernate.orm.deprecation - HHH90000025: PostgreSQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default) +2025-12-15 17:11:33 [Test worker] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit 'default' +2025-12-15 17:11:33 [SpringApplicationShutdownHook] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default' +2025-12-15 17:11:33 [SpringApplicationShutdownHook] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default' +2025-12-15 17:11:39 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode +2025-12-15 17:11:39 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data JDBC repositories in DEFAULT mode. +2025-12-15 17:11:39 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data JDBC - Could not safely identify store assignment for repository candidate interface store.slackjudge.batch.infra.mongo.repository.UserSolvedSnapShotRepository; If you want this repository to be a JDBC repository, consider annotating your entities with one of these annotations: org.springframework.data.relational.core.mapping.Table. +2025-12-15 17:11:39 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 14 ms. Found 0 JDBC repository interfaces. +2025-12-15 17:11:39 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode +2025-12-15 17:11:39 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2025-12-15 17:11:39 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data JPA - Could not safely identify store assignment for repository candidate interface store.slackjudge.batch.infra.mongo.repository.UserSolvedSnapShotRepository; If you want this repository to be a JPA repository, consider annotating your entities with one of these annotations: jakarta.persistence.Entity, jakarta.persistence.MappedSuperclass (preferred), or consider extending one of the following types with your repository: org.springframework.data.jpa.repository.JpaRepository +2025-12-15 17:11:39 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 5 ms. Found 0 JPA repository interfaces. +2025-12-15 17:11:39 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode +2025-12-15 17:11:39 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data MongoDB repositories in DEFAULT mode. +2025-12-15 17:11:39 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 56 ms. Found 1 MongoDB repository interface. +2025-12-15 17:11:39 [Test worker] INFO o.s.o.j.p.SpringPersistenceUnitInfo - No LoadTimeWeaver setup: ignoring JPA class transformer +2025-12-15 17:11:41 [Test worker] WARN org.hibernate.orm.deprecation - HHH90000025: PostgreSQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default) +2025-12-15 17:11:41 [Test worker] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit 'default' +2025-12-15 17:11:41 [Test worker] DEBUG org.mongodb.driver.connection - Connection pool created for localhost:27017 using options maxIdleTimeMS=0, minPoolSize=0, maxPoolSize=100, maxConnecting=2, waitQueueTimeoutMS=120000 +2025-12-15 17:11:41 [cluster-ClusterId{value='693fc2bd400f052caa60fa20', description='null'}-localhost:27017] DEBUG org.mongodb.driver.connection - Connection pool ready for localhost:27017 +2025-12-15 17:11:42 [Test worker] WARN o.s.b.a.o.j.JpaBaseConfiguration$JpaWebConfiguration - spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning +2025-12-15 17:11:42 [Test worker] INFO o.s.b.c.l.s.TaskExecutorJobLauncher - Job: [SimpleJob: [name=slackJudge]] launched with the following parameters: [{'batchTime':'{value=2025-12-15T17:11:42.653289, type=class java.time.LocalDateTime, identifying=true}'}] +2025-12-15 17:11:42 [Test worker] INFO o.s.batch.core.job.SimpleStepHandler - Executing step: [LoadAllUsersStep] +2025-12-15 17:11:42 [Test worker] INFO o.s.batch.core.step.AbstractStep - Step: [LoadAllUsersStep] executed in 9ms +2025-12-15 17:11:42 [Test worker] INFO o.s.batch.core.job.SimpleStepHandler - Executing step: [LoadSnapshotStep] +2025-12-15 17:11:42 [Test worker] INFO o.s.batch.core.step.AbstractStep - Step: [LoadSnapshotStep] executed in 19ms +2025-12-15 17:11:42 [Test worker] INFO o.s.batch.core.job.SimpleStepHandler - Executing step: [FetchSolvedAcUserInfoStep] +2025-12-15 17:11:42 [Test worker] INFO o.s.batch.core.step.AbstractStep - Step: [FetchSolvedAcUserInfoStep] executed in 4ms +2025-12-15 17:11:42 [Test worker] INFO o.s.batch.core.job.SimpleStepHandler - Executing step: [detectAndUpdateUserTierAndProblemStep] +2025-12-15 17:11:42 [Test worker] INFO o.s.batch.core.step.AbstractStep - Step: [detectAndUpdateUserTierAndProblemStep] executed in 5ms +2025-12-15 17:11:42 [Test worker] INFO o.s.batch.core.job.SimpleStepHandler - Executing step: [saveSnapshotStep] +2025-12-15 17:11:42 [Test worker] INFO o.s.batch.core.step.AbstractStep - Step: [saveSnapshotStep] executed in 3ms +2025-12-15 17:11:42 [Test worker] INFO o.s.b.c.l.s.TaskExecutorJobLauncher - Job: [SimpleJob: [name=slackJudge]] completed with the following parameters: [{'batchTime':'{value=2025-12-15T17:11:42.653289, type=class java.time.LocalDateTime, identifying=true}'}] and the following status: [COMPLETED] in 150ms +2025-12-15 17:11:42 [SpringApplicationShutdownHook] DEBUG org.mongodb.driver.connection - Connection pool closed for localhost:27017 +2025-12-15 17:11:42 [SpringApplicationShutdownHook] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default' +2025-12-15 17:11:57 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode +2025-12-15 17:11:57 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data JDBC repositories in DEFAULT mode. +2025-12-15 17:11:57 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data JDBC - Could not safely identify store assignment for repository candidate interface store.slackjudge.batch.infra.mongo.repository.UserSolvedSnapShotRepository; If you want this repository to be a JDBC repository, consider annotating your entities with one of these annotations: org.springframework.data.relational.core.mapping.Table. +2025-12-15 17:11:57 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 13 ms. Found 0 JDBC repository interfaces. +2025-12-15 17:11:57 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode +2025-12-15 17:11:57 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2025-12-15 17:11:57 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data JPA - Could not safely identify store assignment for repository candidate interface store.slackjudge.batch.infra.mongo.repository.UserSolvedSnapShotRepository; If you want this repository to be a JPA repository, consider annotating your entities with one of these annotations: jakarta.persistence.Entity, jakarta.persistence.MappedSuperclass (preferred), or consider extending one of the following types with your repository: org.springframework.data.jpa.repository.JpaRepository +2025-12-15 17:11:57 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 4 ms. Found 0 JPA repository interfaces. +2025-12-15 17:11:57 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode +2025-12-15 17:11:57 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data MongoDB repositories in DEFAULT mode. +2025-12-15 17:11:57 [Test worker] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 53 ms. Found 1 MongoDB repository interface. +2025-12-15 17:11:57 [Test worker] INFO o.s.o.j.p.SpringPersistenceUnitInfo - No LoadTimeWeaver setup: ignoring JPA class transformer +2025-12-15 17:11:59 [Test worker] WARN org.hibernate.orm.deprecation - HHH90000025: PostgreSQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default) +2025-12-15 17:11:59 [Test worker] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit 'default' +2025-12-15 17:12:00 [Test worker] DEBUG org.mongodb.driver.connection - Connection pool created for localhost:27017 using options maxIdleTimeMS=0, minPoolSize=0, maxPoolSize=100, maxConnecting=2, waitQueueTimeoutMS=120000 +2025-12-15 17:12:00 [cluster-ClusterId{value='693fc2d0052b6b3b4c6bc452', description='null'}-localhost:27017] DEBUG org.mongodb.driver.connection - Connection pool ready for localhost:27017 +2025-12-15 17:12:00 [Test worker] WARN o.s.b.a.o.j.JpaBaseConfiguration$JpaWebConfiguration - spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning +2025-12-15 17:12:00 [Test worker] INFO o.s.b.c.l.s.TaskExecutorJobLauncher - Job: [SimpleJob: [name=slackJudge]] launched with the following parameters: [{'batchTime':'{value=2025-12-15T17:12:00.542972, type=class java.time.LocalDateTime, identifying=true}'}] +2025-12-15 17:12:00 [Test worker] INFO o.s.batch.core.job.SimpleStepHandler - Executing step: [LoadAllUsersStep] +2025-12-15 17:12:00 [Test worker] INFO o.s.batch.core.step.AbstractStep - Step: [LoadAllUsersStep] executed in 9ms +2025-12-15 17:12:00 [Test worker] INFO o.s.batch.core.job.SimpleStepHandler - Executing step: [LoadSnapshotStep] +2025-12-15 17:12:00 [Test worker] INFO o.s.batch.core.step.AbstractStep - Step: [LoadSnapshotStep] executed in 16ms +2025-12-15 17:12:00 [Test worker] INFO o.s.batch.core.job.SimpleStepHandler - Executing step: [FetchSolvedAcUserInfoStep] +2025-12-15 17:12:00 [Test worker] INFO o.s.batch.core.step.AbstractStep - Step: [FetchSolvedAcUserInfoStep] executed in 3ms +2025-12-15 17:12:00 [Test worker] INFO o.s.batch.core.job.SimpleStepHandler - Executing step: [detectAndUpdateUserTierAndProblemStep] +2025-12-15 17:12:00 [Test worker] INFO o.s.batch.core.step.AbstractStep - Step: [detectAndUpdateUserTierAndProblemStep] executed in 4ms +2025-12-15 17:12:00 [Test worker] INFO o.s.batch.core.job.SimpleStepHandler - Executing step: [saveSnapshotStep] +2025-12-15 17:12:00 [Test worker] INFO o.s.batch.core.step.AbstractStep - Step: [saveSnapshotStep] executed in 2ms +2025-12-15 17:12:00 [Test worker] INFO o.s.b.c.l.s.TaskExecutorJobLauncher - Job: [SimpleJob: [name=slackJudge]] completed with the following parameters: [{'batchTime':'{value=2025-12-15T17:12:00.542972, type=class java.time.LocalDateTime, identifying=true}'}] and the following status: [COMPLETED] in 127ms +2025-12-15 17:12:00 [SpringApplicationShutdownHook] DEBUG org.mongodb.driver.connection - Connection pool closed for localhost:27017 +2025-12-15 17:12:00 [SpringApplicationShutdownHook] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default' diff --git a/slackjudge/src/main/java/store/slackjudge/batch/SlackJudgeBatchRunner.java b/slackjudge/src/main/java/store/slackjudge/batch/SlackJudgeBatchRunner.java index 79e03c2..4c177ec 100644 --- a/slackjudge/src/main/java/store/slackjudge/batch/SlackJudgeBatchRunner.java +++ b/slackjudge/src/main/java/store/slackjudge/batch/SlackJudgeBatchRunner.java @@ -8,6 +8,7 @@ import org.springframework.batch.core.launch.JobLauncher; import org.springframework.boot.CommandLineRunner; import org.springframework.stereotype.Component; +import store.slackjudge.batch.common.CalculateSnapShotDate; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; @@ -18,6 +19,7 @@ public class SlackJudgeBatchRunner implements CommandLineRunner { private final JobLauncher jobLauncher; private final Job slackJudgeBatch; + private final CalculateSnapShotDate calculateSnapShotDate; @Override public void run(String... args) throws Exception { @@ -39,11 +41,11 @@ public void run(String... args) throws Exception { private LocalDateTime parseBatchTime(String[] args) { if (args.length > 0) { try { - return LocalDateTime.parse(args[0], DateTimeFormatter.ISO_LOCAL_DATE_TIME); + return calculateSnapShotDate.returnKst(LocalDateTime.parse(args[0], DateTimeFormatter.ISO_LOCAL_DATE_TIME)); } catch (Exception e) { log.warn("Invalid batchTime format: {}, using current time", args[0]); } } - return LocalDateTime.now(); + return calculateSnapShotDate.returnKst(LocalDateTime.now()); } } diff --git a/slackjudge/src/main/java/store/slackjudge/batch/common/CalculateSnapShotDate.java b/slackjudge/src/main/java/store/slackjudge/batch/common/CalculateSnapShotDate.java index 7879052..d374558 100644 --- a/slackjudge/src/main/java/store/slackjudge/batch/common/CalculateSnapShotDate.java +++ b/slackjudge/src/main/java/store/slackjudge/batch/common/CalculateSnapShotDate.java @@ -5,6 +5,8 @@ import java.time.Clock; import java.time.LocalDateTime; +import java.time.OffsetDateTime; +import java.time.ZoneId; import java.time.temporal.ChronoUnit; /** @@ -14,6 +16,8 @@ @RequiredArgsConstructor public class CalculateSnapShotDate { private final Clock clock; + private final ZoneId KST=ZoneId.of("Asia/Seoul"); + private final ZoneId UTC=ZoneId.of("UTC"); /*========================== * @@ -56,4 +60,21 @@ public LocalDateTime snapshotDate(LocalDateTime time){ return currentHour(time).minusHours(1); } + + /*========================== + * + *CalculateSnapShotDate + * UTC->KST + * @parm + * @return + * @author kimdoyeon + * @version 1.0.0 + * @date 25. 12. 16. + * + ==========================**/ + public LocalDateTime returnKst(LocalDateTime utcTime){ + return utcTime.atZone(UTC) + .withZoneSameInstant(KST) + .toLocalDateTime(); + } } diff --git a/slackjudge/src/main/resources/application.yml b/slackjudge/src/main/resources/application.yml index bba5f50..e2a303c 100644 --- a/slackjudge/src/main/resources/application.yml +++ b/slackjudge/src/main/resources/application.yml @@ -61,7 +61,7 @@ spring: slack: webhook: - url: ${SLACK_WEBHOOK_URL} + url: ${SLACK_WEBHOOK_URL:} enabled: true logging: diff --git a/slackjudge/src/main/resources/mongo.yml b/slackjudge/src/main/resources/mongo.yml index 11469d9..97ab58e 100644 --- a/slackjudge/src/main/resources/mongo.yml +++ b/slackjudge/src/main/resources/mongo.yml @@ -31,7 +31,7 @@ spring.config.activate.on-profile: prod spring: data: mongodb: - uri: ${MONGO_URI} + uri: ${MONGO_URL} database: ${MONGO_DATABASE} username: ${MONGO_USER_NAME} password: ${MONGO_PASSWORD}