Skip to content

Commit

Permalink
Fix optimization and restart scripts, re-enable optimization in RACK …
Browse files Browse the repository at this point in the history
…UI (#949)

Resolves Issue #945
  • Loading branch information
weisenje committed Mar 28, 2023
1 parent a0cd804 commit 638f29d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
7 changes: 5 additions & 2 deletions cli/optimize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ FUSEKI_PID=$(systemctl show --property MainPID fuseki)
FUSEKI_PID=${FUSEKI_PID#"MainPID="}
if [ -n "${FUSEKI_PID}" ]; then
systemctl stop fuseki
# systemctl doesn't always seem to succeed, so be quite certain
# until we figure out why it doesn't always succeed
fi
# systemctl stop doesn't always work, so kill -9 for now to be sure
FUSEKI_PID=$(systemctl show --property MainPID fuseki)
FUSEKI_PID=${FUSEKI_PID#"MainPID="}
if [ -n "${FUSEKI_PID}" ]; then
kill -9 "${FUSEKI_PID}" > /dev/null 2>&1
fi

Expand Down
8 changes: 5 additions & 3 deletions cli/restart-fuseki.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ set -e

FUSEKI_PID=$(systemctl show --property MainPID fuseki)
FUSEKI_PID=${FUSEKI_PID#"MainPID="}

if [ -n "${FUSEKI_PID}" ]; then
systemctl stop fuseki
# systemctl doesn't always seem to succeed, so be quite certain
# until we figure out why it doesn't always succeed
fi
# systemctl stop doesn't always work, so kill -9 for now to be sure
FUSEKI_PID=$(systemctl show --property MainPID fuseki)
FUSEKI_PID=${FUSEKI_PID#"MainPID="}
if [ -n "${FUSEKI_PID}" ]; then
kill -9 "${FUSEKI_PID}" > /dev/null 2>&1
fi

Expand Down
4 changes: 2 additions & 2 deletions rack-ui/pages/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ def run_ingest(load_button_clicks, status_filepath, zip_filepath, load_options):
last_loaded_graphs = manifest.getModelgraphsFootprint() + manifest.getDatagraphsFootprint()

# optimize triple store
#if manifest.getNeedsOptimization():
# rack.invoke_optimization(None)
if manifest.getNeedsOptimization():
rack.invoke_optimization(None)

time.sleep(3)
except Exception as e:
Expand Down

0 comments on commit 638f29d

Please sign in to comment.