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

Added some query filters on Job executions #878

Merged
merged 5 commits into from
Jan 6, 2021
Merged

Added some query filters on Job executions #878

merged 5 commits into from
Jan 6, 2021

Conversation

MGSousa
Copy link
Contributor

@MGSousa MGSousa commented Dec 23, 2020

No description provided.

Copy link
Member

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but could you rename JobExecutionsOptions to ExecutionOptions?

Copy link
Member

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work unless executions are stored in json in BuntDB, now they are stored in binary protobuf, or am I missing something?

@MGSousa
Copy link
Contributor Author

MGSousa commented Dec 27, 2020

Yes, the executions are stored in binary Protobuf with proto.Marshal but these changes will be ready for JSON marshaling in the future (if migrated), also it contains an option to order all executions by ASC or DESC and by itself is helpful.

@MGSousa
Copy link
Contributor Author

MGSousa commented Dec 27, 2020

LGTM but could you rename JobExecutionsOptions to ExecutionOptions?

Done!

dkron/storage.go Outdated Show resolved Hide resolved
@vcastellm
Copy link
Member

Yes, the executions are stored in binary Protobuf with proto.Marshal but these changes will be ready for JSON marshaling in the future (if migrated),

Then why implement this if it does not work? You can implement json marshal/unmarshal with fallback to proto.Unmarshal as I did with jobs, take a look at https://github.com/distribworks/dkron/blob/master/dkron/store.go#L309-L315

also it contains an option to order all executions by ASC or DESC and by itself is helpful.

You mean ASC or DESC by the key?

@MGSousa
Copy link
Contributor Author

MGSousa commented Dec 28, 2020

You mean ASC or DESC by the key?

Indeed.

Copy link
Member

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vcastellm vcastellm merged commit 2d052ef into distribworks:master Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants