Skip to content

Commit

Permalink
refactor: better fault handling
Browse files Browse the repository at this point in the history
  • Loading branch information
berezovskyi committed Jan 1, 2025
1 parent fcc133e commit 842ce81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions backend/src/main/java/sparqles/utils/MongoDBManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ public void initEndpointCollection() {
public void initScheduleCollection() {
DBCollection c = db.getCollection(COLL_SCHED);
c.drop();
log.warn("Collection '{}' dropped", COLL_SCHED);
}

public void initAggregateCollections() {
Expand Down
2 changes: 2 additions & 0 deletions backend/src/main/java/sparqles/utils/cli/SPARQLES.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@ protected void execute(CommandLine cmd) {
}
if (CLIObject.hasOption(cmd, ARGUMENTS.PARAM_FLAG_RESCHEDULE)) {
Collection<Schedule> epss = Scheduler.createDefaultSchedule(dbm);
log.info("Created a new schedule for {} endpoints", epss.size());
dbm.initScheduleCollection();
dbm.setup();
dbm.insert(epss);
log.info("Persisted the schedule for {} endpoints", epss.size());
}
if (CLIObject.hasOption(cmd, ARGUMENTS.PARAM_FLAG_RECOMPUTE)) {
recomputeAnalytics(false);
Expand Down

0 comments on commit 842ce81

Please sign in to comment.