Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Grégoire Locqueville
purescript-gargantext
Commits
35bbbf08
Commit
35bbbf08
authored
Dec 22, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[async tasks] fix error reporting for async tasks, add 0.14.4 PS for CI
parent
1c46c74a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
.gitlab-ci.yml
.gitlab-ci.yml
+1
-1
Utils.purs
src/Gargantext/Config/Utils.purs
+2
-1
Types.purs
src/Gargantext/Types.purs
+3
-2
No files found.
.gitlab-ci.yml
View file @
35bbbf08
...
...
@@ -25,7 +25,7 @@ test:
script
:
# find 0.14.2 purescript version here:
# https://lazamar.co.uk/nix-versions/
-
nix-env -i purescript-0.14.
2
-f https://github.com/NixOS/nixpkgs/archive/bed08131cd29a85f19716d9351940bdc34834492.tar.gz
-
nix-env -i purescript-0.14.
4
-f https://github.com/NixOS/nixpkgs/archive/bed08131cd29a85f19716d9351940bdc34834492.tar.gz
-
nix-env -i git
-
nix-env -i nodejs
-
nix-env -i yarn
...
...
src/Gargantext/Config/Utils.purs
View file @
35bbbf08
...
...
@@ -5,6 +5,7 @@ import Gargantext.Prelude
import Data.Array as A
import Data.Either (Either(..))
import Data.Foldable (foldl)
import Data.Maybe (fromMaybe)
import Effect (Effect)
import Effect.Aff (Aff)
import Effect.Class (liftEffect)
...
...
@@ -41,7 +42,7 @@ handleErrorInAsyncProgress errors ap@(AsyncProgress { log, status: IsFinished })
handleErrorInAsyncProgress _ _ = pure unit
concatErrors :: AsyncProgress -> String
concatErrors (AsyncProgress {
log }) = foldl eventsErrorMessage ""
log
concatErrors (AsyncProgress {
error, log }) = foldl eventsErrorMessage (fromMaybe "" error)
log
where
eventsErrorMessage acc (AsyncTaskLog { events }) = (foldl eventErrorMessage "" events) <> "\n" <> acc
eventErrorMessage acc (AsyncEvent { level: "ERROR", message }) = message <> "\n" <> acc
...
...
src/Gargantext/Types.purs
View file @
35bbbf08
...
...
@@ -736,8 +736,9 @@ derive newtype instance JSON.ReadForeign AsyncTaskWithType
instance Eq AsyncTaskWithType where eq = genericEq
newtype AsyncProgress = AsyncProgress
{ id :: AsyncTaskID
, log :: Array AsyncTaskLog
{ id :: AsyncTaskID
, error :: Maybe String
, log :: Array AsyncTaskLog
, status :: AsyncTaskStatus
}
derive instance Generic AsyncProgress _
...
...
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