-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from rjojjr/refactor-lock-unsuccessful
Release v1.1.0
- Loading branch information
Showing
12 changed files
with
156 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM gradle:7.6.4-jdk17 AS builder | ||
COPY . /project | ||
WORKDIR /project | ||
RUN gradle bootJar | ||
|
||
FROM openjdk:17-jdk-slim-bullseye | ||
ARG JAR_FILE=/project/build/libs/*.jar | ||
COPY --from=builder ${JAR_FILE} ./application.jar | ||
ENV TZ=America/Chicago | ||
ENV TASKS_LOCK_API_ENABLED=true | ||
ENV SPRING_PROFILES_ACTIVE=tasks-lock-api | ||
ENTRYPOINT ["java", "-jar", "application.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/main/java/rjojjr/com/github/taskslock/exception/AcquireLockFailureException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package rjojjr.com.github.taskslock.exception; | ||
|
||
public class AcquireLockFailureException extends TasksLockApiException { | ||
public AcquireLockFailureException(String taskName, Exception cause) { | ||
super(String.format("error while acquiring lock for task %s: %s", taskName, cause), cause); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/rjojjr/com/github/taskslock/exception/ReleaseLockFailureException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package rjojjr.com.github.taskslock.exception; | ||
|
||
public class ReleaseLockFailureException extends TasksLockApiException { | ||
public ReleaseLockFailureException(String taskName, Exception cause) { | ||
super(String.format("error while releasing lock for %s: %s", taskName, cause.getMessage()), cause); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/rjojjr/com/github/taskslock/exception/TasksLockApiException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package rjojjr.com.github.taskslock.exception; | ||
|
||
public class TasksLockApiException extends RuntimeException { | ||
public TasksLockApiException(String message, Exception cause) { | ||
super(message, cause); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/rjojjr/com/github/taskslock/exception/TasksLockShutdownFailure.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package rjojjr.com.github.taskslock.exception; | ||
|
||
public class TasksLockShutdownFailure extends TasksLockApiException { | ||
public TasksLockShutdownFailure(Exception cause) { | ||
super("failed to run TasksLock API shutdown procedure", cause); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect | ||
spring.jpa.hibernate.ddl-auto=update | ||
spring.datasource.url=jdbc:mysql://${MYSQL_HOST:mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:default}?useSSL=false&allowPublicKeyRetrieval=true | ||
spring.datasource.username=${MYSQL_USERNAME:user} | ||
spring.datasource.password=${MYSQL_PW:password} |