Safe Haskell | None |
---|---|
Language | GHC2024 |
Synopsis
- type TableLastRuns = SpecTableName -> Maybe LastRunInfos
- data LastRunInfos = LastRunInfos {}
- loadTableLastRuns :: (MonadIO m, Katip m) => KVS -> (SpecTableName -> Ref Table) -> Map (Ref Table) NormalizedTable -> Set SpecTableName -> m TableLastRuns
- recordedRunDAG :: (HasBackendQueryStats bk, Typeable bk) => KVS -> Task (Executable bk) -> (AppName, RunId) -> (SpecTableName -> Ref Table) -> Map (Ref Table) NormalizedTable -> Combo bk (TaskResult bk) -> Combo bk (Either SomeException (TaskResult bk))
- data SuccessfulTaskDuration = SuccessfulTaskDuration AppName TaskId
- data SuccessfulTaskDurationInfo = SuccessfulTaskDurationInfo {}
- newtype TableLastRun = TableLastRun (Ref Table)
- data LastRunInfo = LastRunInfo {}
- newtype TableLastSuccessfulRun = TableLastSuccessfulRun (Ref Table)
- data LastSuccessfulRunInfo = LastSuccessfulRunInfo {}
- registerTaskFinished :: (MonadIO m, Katip m) => KVS -> (SpecTableName -> Ref Table) -> (AppName, RunId) -> Task (Executable bk) -> (UTCTime, UTCTime) -> Bool -> m ()
- registerTaskStarted :: (MonadIO m, Katip m) => KVS -> (SpecTableName -> Ref Table) -> (AppName, RunId) -> Task (Executable bk) -> UTCTime -> m ()
- loadEstimates :: (MonadIO m, Katip m) => KVS -> AppName -> TasksDAG Exec b -> m (Map TaskId NominalDiffTime)
Documentation
type TableLastRuns = SpecTableName -> Maybe LastRunInfos #
data LastRunInfos #
Instances
loadTableLastRuns :: (MonadIO m, Katip m) => KVS -> (SpecTableName -> Ref Table) -> Map (Ref Table) NormalizedTable -> Set SpecTableName -> m TableLastRuns #
recordedRunDAG :: (HasBackendQueryStats bk, Typeable bk) => KVS -> Task (Executable bk) -> (AppName, RunId) -> (SpecTableName -> Ref Table) -> Map (Ref Table) NormalizedTable -> Combo bk (TaskResult bk) -> Combo bk (Either SomeException (TaskResult bk)) #
Do a run, recording the instance in the database. Return the recorded instance along with the run results.
data SuccessfulTaskDuration #
Instances
Generic SuccessfulTaskDuration # | |||||
Defined in Napkin.Run.Metadata
| |||||
Eq SuccessfulTaskDuration # | |||||
Defined in Napkin.Run.Metadata | |||||
Ord SuccessfulTaskDuration # | |||||
Defined in Napkin.Run.Metadata compare :: SuccessfulTaskDuration -> SuccessfulTaskDuration -> Ordering # (<) :: SuccessfulTaskDuration -> SuccessfulTaskDuration -> Bool # (<=) :: SuccessfulTaskDuration -> SuccessfulTaskDuration -> Bool # (>) :: SuccessfulTaskDuration -> SuccessfulTaskDuration -> Bool # (>=) :: SuccessfulTaskDuration -> SuccessfulTaskDuration -> Bool # max :: SuccessfulTaskDuration -> SuccessfulTaskDuration -> SuccessfulTaskDuration # min :: SuccessfulTaskDuration -> SuccessfulTaskDuration -> SuccessfulTaskDuration # | |||||
MetadataPayload SuccessfulTaskDuration SuccessfulTaskDurationInfo # | |||||
Defined in Napkin.Run.Metadata keyText :: SuccessfulTaskDuration -> Text # | |||||
type Rep SuccessfulTaskDuration # | |||||
Defined in Napkin.Run.Metadata type Rep SuccessfulTaskDuration = D1 ('MetaData "SuccessfulTaskDuration" "Napkin.Run.Metadata" "napkin-runtime-2.0.0-Ct8w2lsjRa3AUoSevHfCKx" 'False) (C1 ('MetaCons "SuccessfulTaskDuration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AppName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TaskId))) |
data SuccessfulTaskDurationInfo #
Instances
FromJSON SuccessfulTaskDurationInfo # | |||||
ToJSON SuccessfulTaskDurationInfo # | |||||
Defined in Napkin.Run.Metadata | |||||
Default SuccessfulTaskDurationInfo # | |||||
Defined in Napkin.Run.Metadata | |||||
Generic SuccessfulTaskDurationInfo # | |||||
Defined in Napkin.Run.Metadata
| |||||
MetadataPayload SuccessfulTaskDuration SuccessfulTaskDurationInfo # | |||||
Defined in Napkin.Run.Metadata keyText :: SuccessfulTaskDuration -> Text # | |||||
type Rep SuccessfulTaskDurationInfo # | |||||
Defined in Napkin.Run.Metadata type Rep SuccessfulTaskDurationInfo = D1 ('MetaData "SuccessfulTaskDurationInfo" "Napkin.Run.Metadata" "napkin-runtime-2.0.0-Ct8w2lsjRa3AUoSevHfCKx" 'False) (C1 ('MetaCons "SuccessfulTaskDurationInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "previousRuns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map UTCTime NominalDiffTime)))) |
newtype TableLastRun #
Instances
Generic TableLastRun # | |||||
Defined in Napkin.Run.Metadata
from :: TableLastRun -> Rep TableLastRun x # to :: Rep TableLastRun x -> TableLastRun # | |||||
Eq TableLastRun # | |||||
Defined in Napkin.Run.Metadata (==) :: TableLastRun -> TableLastRun -> Bool # (/=) :: TableLastRun -> TableLastRun -> Bool # | |||||
Ord TableLastRun # | |||||
Defined in Napkin.Run.Metadata compare :: TableLastRun -> TableLastRun -> Ordering # (<) :: TableLastRun -> TableLastRun -> Bool # (<=) :: TableLastRun -> TableLastRun -> Bool # (>) :: TableLastRun -> TableLastRun -> Bool # (>=) :: TableLastRun -> TableLastRun -> Bool # max :: TableLastRun -> TableLastRun -> TableLastRun # min :: TableLastRun -> TableLastRun -> TableLastRun # | |||||
MetadataPayload TableLastRun LastRunInfo # | |||||
Defined in Napkin.Run.Metadata keyText :: TableLastRun -> Text # | |||||
type Rep TableLastRun # | |||||
Defined in Napkin.Run.Metadata type Rep TableLastRun = D1 ('MetaData "TableLastRun" "Napkin.Run.Metadata" "napkin-runtime-2.0.0-Ct8w2lsjRa3AUoSevHfCKx" 'True) (C1 ('MetaCons "TableLastRun" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ref Table)))) |
data LastRunInfo #
Instances
FromJSON LastRunInfo # | |||||
Defined in Napkin.Run.Metadata parseJSON :: Value -> Parser LastRunInfo # parseJSONList :: Value -> Parser [LastRunInfo] # | |||||
ToJSON LastRunInfo # | |||||
Defined in Napkin.Run.Metadata toJSON :: LastRunInfo -> Value # toEncoding :: LastRunInfo -> Encoding # toJSONList :: [LastRunInfo] -> Value # toEncodingList :: [LastRunInfo] -> Encoding # omitField :: LastRunInfo -> Bool # | |||||
Generic LastRunInfo # | |||||
Defined in Napkin.Run.Metadata
from :: LastRunInfo -> Rep LastRunInfo x # to :: Rep LastRunInfo x -> LastRunInfo # | |||||
Show LastRunInfo # | |||||
Defined in Napkin.Run.Metadata showsPrec :: Int -> LastRunInfo -> ShowS # show :: LastRunInfo -> String # showList :: [LastRunInfo] -> ShowS # | |||||
MetadataPayload TableLastRun LastRunInfo # | |||||
Defined in Napkin.Run.Metadata keyText :: TableLastRun -> Text # | |||||
type Rep LastRunInfo # | |||||
Defined in Napkin.Run.Metadata type Rep LastRunInfo = D1 ('MetaData "LastRunInfo" "Napkin.Run.Metadata" "napkin-runtime-2.0.0-Ct8w2lsjRa3AUoSevHfCKx" 'False) (C1 ('MetaCons "LastRunInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "runId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RunId) :*: S1 ('MetaSel ('Just "appName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AppName)) :*: (S1 ('MetaSel ('Just "startedAt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime) :*: (S1 ('MetaSel ('Just "finishedAt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe UTCTime)) :*: S1 ('MetaSel ('Just "successful") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))) |
newtype TableLastSuccessfulRun #
Instances
Generic TableLastSuccessfulRun # | |||||
Defined in Napkin.Run.Metadata
| |||||
Eq TableLastSuccessfulRun # | |||||
Defined in Napkin.Run.Metadata | |||||
Ord TableLastSuccessfulRun # | |||||
Defined in Napkin.Run.Metadata compare :: TableLastSuccessfulRun -> TableLastSuccessfulRun -> Ordering # (<) :: TableLastSuccessfulRun -> TableLastSuccessfulRun -> Bool # (<=) :: TableLastSuccessfulRun -> TableLastSuccessfulRun -> Bool # (>) :: TableLastSuccessfulRun -> TableLastSuccessfulRun -> Bool # (>=) :: TableLastSuccessfulRun -> TableLastSuccessfulRun -> Bool # max :: TableLastSuccessfulRun -> TableLastSuccessfulRun -> TableLastSuccessfulRun # min :: TableLastSuccessfulRun -> TableLastSuccessfulRun -> TableLastSuccessfulRun # | |||||
MetadataPayload TableLastSuccessfulRun LastSuccessfulRunInfo # | |||||
Defined in Napkin.Run.Metadata keyText :: TableLastSuccessfulRun -> Text # | |||||
type Rep TableLastSuccessfulRun # | |||||
Defined in Napkin.Run.Metadata type Rep TableLastSuccessfulRun = D1 ('MetaData "TableLastSuccessfulRun" "Napkin.Run.Metadata" "napkin-runtime-2.0.0-Ct8w2lsjRa3AUoSevHfCKx" 'True) (C1 ('MetaCons "TableLastSuccessfulRun" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ref Table)))) |
data LastSuccessfulRunInfo #
Instances
FromJSON LastSuccessfulRunInfo # | |||||
Defined in Napkin.Run.Metadata | |||||
ToJSON LastSuccessfulRunInfo # | |||||
Defined in Napkin.Run.Metadata toJSON :: LastSuccessfulRunInfo -> Value # toEncoding :: LastSuccessfulRunInfo -> Encoding # toJSONList :: [LastSuccessfulRunInfo] -> Value # toEncodingList :: [LastSuccessfulRunInfo] -> Encoding # omitField :: LastSuccessfulRunInfo -> Bool # | |||||
Generic LastSuccessfulRunInfo # | |||||
Defined in Napkin.Run.Metadata
| |||||
Show LastSuccessfulRunInfo # | |||||
Defined in Napkin.Run.Metadata showsPrec :: Int -> LastSuccessfulRunInfo -> ShowS # show :: LastSuccessfulRunInfo -> String # showList :: [LastSuccessfulRunInfo] -> ShowS # | |||||
MetadataPayload TableLastSuccessfulRun LastSuccessfulRunInfo # | |||||
Defined in Napkin.Run.Metadata keyText :: TableLastSuccessfulRun -> Text # | |||||
type Rep LastSuccessfulRunInfo # | |||||
Defined in Napkin.Run.Metadata type Rep LastSuccessfulRunInfo = D1 ('MetaData "LastSuccessfulRunInfo" "Napkin.Run.Metadata" "napkin-runtime-2.0.0-Ct8w2lsjRa3AUoSevHfCKx" 'False) (C1 ('MetaCons "LastSuccessfulRunInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "runId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RunId) :*: S1 ('MetaSel ('Just "appName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AppName)) :*: (S1 ('MetaSel ('Just "startedAt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "finishedAt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime)))) |
registerTaskFinished :: (MonadIO m, Katip m) => KVS -> (SpecTableName -> Ref Table) -> (AppName, RunId) -> Task (Executable bk) -> (UTCTime, UTCTime) -> Bool -> m () #
registerTaskStarted :: (MonadIO m, Katip m) => KVS -> (SpecTableName -> Ref Table) -> (AppName, RunId) -> Task (Executable bk) -> UTCTime -> m () #