Skip to content

Commit

Permalink
ignore country == null, some stations don't have that functionality. …
Browse files Browse the repository at this point in the history
…cicd testing start in bulk mode
  • Loading branch information
clezag committed Nov 7, 2024
1 parent 7a827fe commit 4fef322
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
X_DOCKER_TAG: ${{ env.DOCKER_TAG }}
X_JAVA_OPTIONS: -Xms128m -Xmx2048m
X_JDBC_URL: ${{ secrets.TEST_JDBC_URL }}
X_OPERATION_MODE: "follow"
# X_OPERATION_MODE: "follow"
X_OPERATION_MODE: "month 2024 11"

- name: Build project
uses: noi-techpark/github-actions/maven-build@v2
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/it/bz/noi/a22traffic/BulkLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ public void run() {
ins.setInt(8, Integer.parseInt(res.get(i).get("class")));
ins.setDouble(9, Double.parseDouble(res.get(i).get("speed")));
ins.setInt(10, Integer.parseInt(res.get(i).get("direction")));
ins.setInt(11, Integer.parseInt(res.get(i).get("country")));
String country = res.get(i).get("country");
ins.setInt(11, country != null ? Integer.parseInt(country) : null);
ins.setString(12, res.get(i).get("license_plate_initials"));
ins.execute();
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/it/bz/noi/a22traffic/Follower.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ public static void fetchNew(Connector conn, String jdbc_url) throws IOException,
pst.setInt(8, Integer.parseInt(res.get(i).get("class")));
pst.setDouble(9, Double.parseDouble(res.get(i).get("speed")));
pst.setInt(10, Integer.parseInt(res.get(i).get("direction")));
pst.setInt(11, Integer.parseInt(res.get(i).get("country")));
String country = res.get(i).get("country");
pst.setInt(11, country != null ? Integer.parseInt(country) : null);
pst.setString(12, res.get(i).get("license_plate_initials"));
pst.execute();
}
Expand Down

0 comments on commit 4fef322

Please sign in to comment.