Skip to content

Commit

Permalink
Merge pull request #58 from MineralsCloud:SumTypes
Browse files Browse the repository at this point in the history
Switch `JobStatus` from `Enum` to sum types
  • Loading branch information
singularitti authored Jan 21, 2024
2 parents 0111930 + 2df9042 commit c501a20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions EasyJobsBase/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ version = "0.15.0"
[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
SumTypes = "8e1ec7a9-0e02-4297-b0fe-6433085c89f2"
Thinkers = "6d80a3f9-a943-41fa-97b3-3004c0daf7a3"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

Expand Down
3 changes: 2 additions & 1 deletion EasyJobsBase/src/jobs.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Dates: DateTime, now
using UUIDs: UUID, uuid1

using SumTypes: @sum_type
using Thinkers: Think

export Job, IndependentJob, ConditionalJob, ArgDependentJob

@enum JobStatus begin
@sum_type JobStatus begin
PENDING
RUNNING
SUCCEEDED
Expand Down

0 comments on commit c501a20

Please sign in to comment.