Skip to content

Commit

Permalink
Merge pull request #188 from JasonHHouse/improvement/add_test_endpoin…
Browse files Browse the repository at this point in the history
…t_for_schedule

Adding test endpoint for schedule
  • Loading branch information
JasonHHouse authored Oct 15, 2020
2 parents 52ea089 + 9ae81f1 commit 5de2164
Show file tree
Hide file tree
Showing 25 changed files with 48 additions and 30 deletions.
4 changes: 2 additions & 2 deletions Core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>Gaps</artifactId>
<groupId>com.jasonhhouse</groupId>
<version>0.8.3</version>
<version>0.8.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -15,7 +15,7 @@
<dependency>
<groupId>com.jasonhhouse</groupId>
<artifactId>Plex</artifactId>
<version>0.8.3</version>
<version>0.8.4</version>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN mkdir -p /usr/app && chmod 777 /usr/data

WORKDIR /usr/app

COPY GapsWeb/target/GapsWeb-0.8.3.jar /usr/app/gaps.jar
COPY GapsWeb/target/GapsWeb-0.8.4.jar /usr/app/gaps.jar

COPY start.sh /usr/app/

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN mkdir -p /usr/app && chmod 777 /usr/data

WORKDIR /usr/app

COPY GapsWeb/target/GapsWeb-0.8.3.jar /usr/app/gaps.jar
COPY GapsWeb/target/GapsWeb-0.8.4.jar /usr/app/gaps.jar

COPY start.sh /usr/app/

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.debug
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN mkdir -p /usr/app && chmod 777 /usr/data

WORKDIR /usr/app

COPY GapsWeb/target/GapsWeb-0.8.3.jar /usr/app/gaps.jar
COPY GapsWeb/target/GapsWeb-0.8.4.jar /usr/app/gaps.jar

COPY startDebug.sh /usr/app/

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ppc64le
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN mkdir -p /usr/app && chmod 777 /usr/data

WORKDIR /usr/app

COPY GapsWeb/target/GapsWeb-0.8.3.jar /usr/app/gaps.jar
COPY GapsWeb/target/GapsWeb-0.8.4.jar /usr/app/gaps.jar

COPY start.sh /usr/app/

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.raspbian
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN mkdir -p /usr/app && chmod 777 /usr/data

WORKDIR /usr/app

COPY GapsWeb/target/GapsWeb-0.8.3.jar /usr/app/gaps.jar
COPY GapsWeb/target/GapsWeb-0.8.4.jar /usr/app/gaps.jar

COPY start.sh /usr/app/

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.riscv64
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN mkdir -p /usr/app && chmod 777 /usr/data

WORKDIR /usr/app

COPY GapsWeb/target/GapsWeb-0.8.3.jar /usr/app/gaps.jar
COPY GapsWeb/target/GapsWeb-0.8.4.jar /usr/app/gaps.jar

COPY start.sh /usr/app/

Expand Down
8 changes: 4 additions & 4 deletions GapsWeb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>Gaps</artifactId>
<groupId>com.jasonhhouse</groupId>
<version>0.8.3</version>
<version>0.8.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -21,19 +21,19 @@
<dependency>
<groupId>com.jasonhhouse</groupId>
<artifactId>Core</artifactId>
<version>0.8.3</version>
<version>0.8.4</version>
</dependency>

<dependency>
<groupId>com.jasonhhouse</groupId>
<artifactId>Plex</artifactId>
<version>0.8.3</version>
<version>0.8.4</version>
</dependency>

<dependency>
<groupId>com.jasonhhouse</groupId>
<artifactId>RadarrV3</artifactId>
<version>0.8.3</version>
<version>0.8.4</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,17 @@ public ResponseEntity<List<Schedule>> getAllSchedules() {
LOGGER.info("getAllSchedules()");
return ResponseEntity.ok().body(schedulerService.getAllSchedules());
}

@GetMapping(value = "/test",
produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<String> getTestSchedule() {
LOGGER.info("getTestSchedule()");
new Runnable() {
@Override
public void run() {
schedulerService.test();
}
};
return ResponseEntity.ok().body("{\"message\":\"Test schedule started\"}");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,6 @@ public GapsSearchService(@Qualifier("real") UrlGenerator urlGenerator, SimpMessa
public void run(@NotNull String machineIdentifier,@NotNull Integer key) {
LOGGER.info("run( {}, {} )", machineIdentifier, key);

//ToDo
if(key.equals(1)) {
return;
}

PlexProperties plexProperties = fileIoService.readProperties();
Optional<PlexServer> optionalPlexServer = plexProperties.getPlexServers().stream().filter(tempPlexServer -> tempPlexServer.getMachineIdentifier().equals(machineIdentifier)).findFirst();
PlexServer plexServer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ public String getJsonSchedule() throws IOException {
return objectMapper.writeValueAsString(fileIoService.readProperties().getSchedule());
}

public void test() {
LOGGER.info("test()");
searchGapsTask.run();
}

private void setTaskForScheduler(Schedule schedule) {
if (scheduledFuture != null) {
scheduledFuture.cancel(true);
Expand Down
2 changes: 1 addition & 1 deletion GapsWeb/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ info:
app:
name: Gaps
description: Gaps searches through your Plex Server or local folders for all movies, then queries for known movies in the same collection. If those movies don't exist in your library, Gaps will recommend getting those movies, legally of course.
version: 0.8.3
version: 0.8.4
storageFolder: /usr/data
properties:
rssFeed: rssFeed.json
Expand Down
2 changes: 1 addition & 1 deletion GapsWeb/src/main/resources/templates/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<img src="/images/final-2.svg" alt="Gaps Logo" style="width:50%;height:50%;" class="center">

<h3 class="top-margin">About</h3>
<h4 class="top-margin text-primary">v0.8.3</h4>
<h4 class="top-margin text-primary">v0.8.4</h4>

<p class="text-muted">Gaps searches through your Plex Server. It then queries
for known
Expand Down
2 changes: 1 addition & 1 deletion GapsWeb/src/main/resources/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<div class="container bottom-margin">
<img src="/images/final-2.svg" alt="Gaps Logo" style="width:50%;height:50%;" class="center">

<h3 class="top-margin">v0.8.3</h3>
<h3 class="top-margin">v0.8.4</h3>

<p class="text-muted">Gaps searches through your Plex Server. It then queries
for known
Expand Down
5 changes: 5 additions & 0 deletions GapsWeb/src/main/resources/templates/updates.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@
<img src="/images/final-2.svg" alt="Gaps Logo" style="width:50%;height:50%;" class="center">

<h3 class="top-margin">Updates</h3>
<h4 class="top-margin text-primary">v0.8.4</h4>
<ul class="text-muted">
<li>Adding endpoint for testing scheduled runs</li>
</ul>

<h4 class="top-margin text-primary">v0.8.3</h4>
<ul class="text-muted">
<li>Adding more Cypress tests and unit tests</li>
Expand Down
2 changes: 1 addition & 1 deletion GapsWeb/src/test/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ info:
app:
name: Gaps
description: Gaps searches through your Plex Server or local folders for all movies, then queries for known movies in the same collection. If those movies don't exist in your library, Gaps will recommend getting those movies, legally of course.
version: 0.8.3
version: 0.8.4
loginEnabled: false
storageFolder: /usr/data
properties:
Expand Down
2 changes: 1 addition & 1 deletion Plex/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>Gaps</artifactId>
<groupId>com.jasonhhouse</groupId>
<version>0.8.3</version>
<version>0.8.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion RadarrV3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>Gaps</artifactId>
<groupId>com.jasonhhouse</groupId>
<version>0.8.3</version>
<version>0.8.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion application-custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ info:
app:
name: Gaps
description: Gaps searches through your Plex Server or local folders for all movies, then queries for known movies in the same collection. If those movies don't exist in your library, Gaps will recommend getting those movies, legally of course.
version: 0.8.3
version: 0.8.4
storageFolder: /{CUSTOM_FOLDER} #Change to folder that gaps has permission to read, write, and delete in.
properties:
rssFeed: rssFeed.json
Expand Down
2 changes: 1 addition & 1 deletion build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
set -e
VERSION=0.8.3
VERSION=0.8.4
JAR_VERSION="GapsWeb/target/GapsWeb-$VERSION.jar"
ZIP_VERSION="GapsAsJar-$VERSION.zip"
npm ci
Expand Down
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ call npm run uglifyjs-pages
call mvn clean install
del GapsOnWindows\*.jar
del GapsOnWindows\README.md
copy GapsWeb\target\GapsWeb-0.8.3.jar GapsOnWindows\gaps.jar
copy GapsWeb\target\GapsWeb-0.8.4.jar GapsOnWindows\gaps.jar
copy README.md GapsOnWindows\
cd GapsOnWindows
makensis gaps.nsi
2 changes: 1 addition & 1 deletion cypress/integration/about/about.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('Verify About Page', () => {
.should('have.text', 'About');

cy.get('.container > :nth-child(3)')
.should('have.text', 'v0.8.3');
.should('have.text', 'v0.8.4');

cy.get('.container > :nth-child(6)')
.should('have.text', 'Software');
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gaps",
"version": "0.8.3",
"version": "0.8.4",
"description": "Gaps searches through your Plex Server or local folders for all movies, then queries for known movies in the same collection. If those movies don't exist in your library, Gaps will recommend getting those movies, legally of course.",
"main": "/",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</parent>
<groupId>com.jasonhhouse</groupId>
<artifactId>Gaps</artifactId>
<version>0.8.3</version>
<version>0.8.4</version>
<name>Gaps</name>
<description>Demo project for Spring Boot</description>

Expand Down

0 comments on commit 5de2164

Please sign in to comment.