| 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:
programIdis generated randomly.- If
hyperionCommandis specified inHyperionConfig, thenhyperionExec==hyperionCommand. Otherwise the running executable is copied toexecDirwith a unique name, and that is used ashyperionExec. newDatabasePathis used to determineprogramDatabasefrominitialDatabaseanddatabaseDir,programId.timedProgramDiris used to determineprogramLogDirandprogramDataDirfrom the values inHyperionConfigandprogramId.slurmWorkerLauncheris used forclusterWorkerLauncherclusterDatabaseRetriesis 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.