summaryrefslogtreecommitdiff
path: root/Types
diff options
context:
space:
mode:
Diffstat (limited to 'Types')
-rw-r--r--Types/ScheduledActivity.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Types/ScheduledActivity.hs b/Types/ScheduledActivity.hs
index 386f42333..b683409ce 100644
--- a/Types/ScheduledActivity.hs
+++ b/Types/ScheduledActivity.hs
@@ -19,6 +19,12 @@ data ScheduledActivity
| ScheduledRemoteFsck UUID Schedule Duration
deriving (Eq, Read, Show, Ord)
+{- Activities that run on a remote, within a time window, so
+ - should be run when the remote gets connected. -}
+connectActivityUUID :: ScheduledActivity -> Maybe UUID
+connectActivityUUID (ScheduledRemoteFsck u (Schedule _ AnyTime) _) = Just u
+connectActivityUUID _ = Nothing
+
getSchedule :: ScheduledActivity -> Schedule
getSchedule (ScheduledSelfFsck s _) = s
getSchedule (ScheduledRemoteFsck _ s _) = s