move EvalResult to Myriad.Docker
This commit is contained in:
parent
e2942e38b9
commit
e27755cdda
2 changed files with 8 additions and 7 deletions
|
@ -4,7 +4,6 @@ module Myriad.Core
|
|||
( Language
|
||||
, ContainerName
|
||||
, ImageName
|
||||
, EvalResult(..)
|
||||
, Env(..)
|
||||
, MyriadT
|
||||
, runMyriadT
|
||||
|
@ -49,11 +48,6 @@ data Env = Env
|
|||
, snowflakeGen :: SnowflakeGen
|
||||
}
|
||||
|
||||
data EvalResult
|
||||
= EvalOk BL.ByteString
|
||||
| EvalTimedOut
|
||||
| EvalErrored
|
||||
|
||||
newtype MyriadT m a = MyriadT { unMyriadT :: ReaderT Env (LoggingT m) a }
|
||||
deriving newtype
|
||||
( Functor
|
||||
|
|
|
@ -11,9 +11,10 @@ module Myriad.Docker
|
|||
|
||||
import Control.Monad.Reader
|
||||
|
||||
import qualified Data.ByteString.Lazy as BL
|
||||
import qualified Data.Map.Strict as M
|
||||
import Data.Snowflake
|
||||
import Data.String.Conversions
|
||||
import Data.String.Conversions
|
||||
|
||||
import Control.Concurrent.Async.Lifted
|
||||
import Control.Concurrent.Lifted (fork, threadDelay)
|
||||
|
@ -28,6 +29,12 @@ import Myriad.Core
|
|||
|
||||
type Myriad = MyriadT IO
|
||||
|
||||
data EvalResult
|
||||
= EvalOk BL.ByteString
|
||||
| EvalTimedOut
|
||||
| EvalErrored
|
||||
deriving (Show)
|
||||
|
||||
buildImage :: Language -> Myriad ()
|
||||
buildImage lang@Language { name, concurrent } = do
|
||||
Env { config = Config { prepareContainers }, languagesDir } <- ask
|
||||
|
|
Loading…
Reference in a new issue