Add post checksum mode
This commit is contained in:
@@ -22,7 +22,7 @@ public class App {
|
||||
private static int season;
|
||||
private static int league;
|
||||
private static String configFile;
|
||||
private static Logger logger = LogManager.getLogger(App.class);
|
||||
private static final Logger logger = LogManager.getLogger(App.class);
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
Configurator.setRootLevel(Level.INFO);
|
||||
@@ -56,6 +56,17 @@ public class App {
|
||||
MatchesListForumUpdater matchesListForumUpdater = new MatchesListForumUpdater();
|
||||
matchesListForumUpdater.updateAllLeagues();
|
||||
break;
|
||||
case "PostChecksum":
|
||||
TippligaSQLConnector con = TippligaSQLConnector.getInstance();
|
||||
int forumId;
|
||||
if (season == 2021) {
|
||||
forumId = 15;
|
||||
} else {
|
||||
throw new Exception("Season does not exist");
|
||||
}
|
||||
String checksum = con.getChecksumOfPost(forumId, configFile);
|
||||
System.out.println(checksum);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -76,7 +87,7 @@ public class App {
|
||||
|
||||
parser.addArgument("-m", "--mode")
|
||||
.dest("mode")
|
||||
.choices("MatchdaysUpdater", "MatchesCreatorFootball", "MatchesUpdaterFootball", "TeamsUpdater", "APIFootballUpdater", "MatchesListGistUpdater")
|
||||
.choices("MatchdaysUpdater", "MatchesCreatorFootball", "MatchesUpdaterFootball", "TeamsUpdater", "APIFootballUpdater", "MatchesListGistUpdater", "PostChecksum")
|
||||
.help("")
|
||||
.required(true)
|
||||
.type(String.class);
|
||||
|
||||
Reference in New Issue
Block a user