Safe Haskell | None |
---|---|
Language | Haskell2010 |
Hyperion.Config
Synopsis
- data HyperionConfig = HyperionConfig {}
- defaultHyperionConfig :: FilePath -> HyperionConfig
- newClusterEnv :: HyperionConfig -> HoldMap -> Int -> IO (ClusterEnv, FilePath)
- newDatabasePath :: Maybe FilePath -> FilePath -> ProgramId -> IO FilePath
- timedProgramDir :: FilePath -> ProgramId -> IO FilePath
Documentation
data HyperionConfig Source #
Global configuration for Hyperion cluster.
Constructors
HyperionConfig | |
Fields
|
defaultHyperionConfig :: FilePath -> HyperionConfig Source #
Default configuration, with all paths built form a single
baseDirectory
newClusterEnv :: HyperionConfig -> HoldMap -> Int -> IO (ClusterEnv, FilePath) Source #
Takes HyperionConfig
and returns ClusterEnv
, the path to the executable,
and a new 'HoldMap.
Things to note:
programId
is generated randomly.- If
hyperionCommand
is specified inHyperionConfig
, thenhyperionExec
==hyperionCommand
. Otherwise the running executable is copied toexecDir
with a unique name, and that is used ashyperionExec
. newDatabasePath
is used to determineprogramDatabase
frominitialDatabase
anddatabaseDir
,programId
.timedProgramDir
is used to determineprogramLogDir
andprogramDataDir
from the values inHyperionConfig
andprogramId
.slurmWorkerLauncher
is used forclusterWorkerLauncher
clusterDatabaseRetries
is set todefaultDBRetries
.
newDatabasePath :: Maybe FilePath -> FilePath -> ProgramId -> IO FilePath Source #
Returns the path to a new database, given Maybe
inital database filepath
and base directory
If ProgramId
id is XXXXX
and initial database filename is original.sqlite
,
then the new filename is original-XXXXX.sqlite
. If initial database path is
Nothing
, then the filename is XXXXX.sqlite
.
The path is in subdirectory YYYY-mm
(determined by current date) of base directory.
If inital database is given, then the new database is initilized with its contents.