Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
191
Issues
191
List
Board
Labels
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
050f8b99
Verified
Commit
050f8b99
authored
Sep 10, 2025
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CLI] rollback changes when panic occurs
parent
2e22eac8
Pipeline
#7875
passed with stages
in 47 minutes and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
DBFixes.hs
bin/gargantext-cli/CLI/DBFixes.hs
+1
-0
No files found.
bin/gargantext-cli/CLI/DBFixes.hs
View file @
050f8b99
...
@@ -79,6 +79,7 @@ fixBrokenHyperdata630CLI (DBFixArgs { settings_toml, dry_run }) = do
...
@@ -79,6 +79,7 @@ fixBrokenHyperdata630CLI (DBFixArgs { settings_toml, dry_run }) = do
-- Check that the hyperdata can be fetched correctly
-- Check that the hyperdata can be fetched correctly
newHd
<-
runPGSQuery
c
[
sql
|
SELECT hyperdata FROM contexts WHERE id = ?
|]
(
PSQL
.
Only
cId
)
::
IO
[
PSQL
.
Only
HyperdataDocument
]
newHd
<-
runPGSQuery
c
[
sql
|
SELECT hyperdata FROM contexts WHERE id = ?
|]
(
PSQL
.
Only
cId
)
::
IO
[
PSQL
.
Only
HyperdataDocument
]
unless
(
length
newHd
==
1
)
$
do
unless
(
length
newHd
==
1
)
$
do
PSQL
.
rollback
c
panicTrace
$
"["
<>
show
cId
<>
"] Error! Can't get new hyperdata: "
<>
show
newHd
panicTrace
$
"["
<>
show
cId
<>
"] Error! Can't get new hyperdata: "
<>
show
newHd
putText
$
"["
<>
show
cId
<>
"] updated correctly"
putText
$
"["
<>
show
cId
<>
"] updated correctly"
)
affectedContexts
)
affectedContexts
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment