-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix sles subscriptions count #167
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f3d1f48
to
39aeffb
Compare
39aeffb
to
4710b4b
Compare
{:error, _} -> | ||
conn | ||
|> put_status(:internal_server_error) | ||
|> json(%{error: "An error occurred in retrieving SLES subscription count."}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, but unnecessary 😄
subscription_projection(identifier: "sle-module-server-applications") | ||
end) | ||
|
||
assert 12 = Repo.all(SlesSubscriptionReadModel) |> length() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert 12 = Repo.all(SlesSubscriptionReadModel) |> length() | |
assert 12 = SlesSubscriptionReadModel |> Repo.all() |> length() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks.
lib/tronto/monitoring/monitoring.ex
Outdated
|
||
case Repo.one(query) do | ||
{:error, _} = error -> | ||
error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repo.one
returns nil or the entity, this case will never match
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of nitpicks and good to go
f3cd26b
to
c507e9a
Compare
Ports this
to tronto in order to properly count sles subscriptions.
Thanks again photofinish 😄