Commit cb5b4bf7 authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge branch 'dev-async-progress-fix' of...

Merge branch 'dev-async-progress-fix' of ssh://gitlab.iscpif.fr:20022/gargantext/purescript-gargantext into dev-merge
parents d1bbee25 2abb6b73
...@@ -472,7 +472,7 @@ asyncTaskTypePath GraphT = "async/" ...@@ -472,7 +472,7 @@ asyncTaskTypePath GraphT = "async/"
type AsyncTaskID = String type AsyncTaskID = String
data AsyncTaskStatus = Running | Failed | Finished | Killed data AsyncTaskStatus = Running | Pending | Received | Started | Failed | Finished | Killed
derive instance genericAsyncTaskStatus :: Generic AsyncTaskStatus _ derive instance genericAsyncTaskStatus :: Generic AsyncTaskStatus _
derive instance eqAsyncTaskStatus :: Eq AsyncTaskStatus derive instance eqAsyncTaskStatus :: Eq AsyncTaskStatus
instance decodeJsonAsyncTaskStatus :: DecodeJson AsyncTaskStatus where instance decodeJsonAsyncTaskStatus :: DecodeJson AsyncTaskStatus where
...@@ -481,10 +481,13 @@ instance decodeJsonAsyncTaskStatus :: DecodeJson AsyncTaskStatus where ...@@ -481,10 +481,13 @@ instance decodeJsonAsyncTaskStatus :: DecodeJson AsyncTaskStatus where
pure $ readAsyncTaskStatus obj pure $ readAsyncTaskStatus obj
readAsyncTaskStatus :: String -> AsyncTaskStatus readAsyncTaskStatus :: String -> AsyncTaskStatus
readAsyncTaskStatus "failed" = Failed readAsyncTaskStatus "IsFailure" = Failed
readAsyncTaskStatus "finished" = Finished readAsyncTaskStatus "IsFinished" = Finished
readAsyncTaskStatus "killed" = Killed readAsyncTaskStatus "IsKilled" = Killed
readAsyncTaskStatus "running" = Running readAsyncTaskStatus "IsPending" = Pending
readAsyncTaskStatus "IsReceived" = Received
readAsyncTaskStatus "IsRunning" = Running
readAsyncTaskStatus "IsStarted" = Started
readAsyncTaskStatus _ = Running readAsyncTaskStatus _ = Running
newtype AsyncTask = AsyncTask { newtype AsyncTask = AsyncTask {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment