Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch JobStatus from Enum to sum types #58

Merged
merged 2 commits into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading