-
Notifications
You must be signed in to change notification settings - Fork 50
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
Feature/housekeeping dataaccess #999
base: master
Are you sure you want to change the base?
Feature/housekeeping dataaccess #999
Conversation
563f6dd
to
d512f14
Compare
@@ -72,7 +72,7 @@ defmodule Astarte.Housekeeping.Mixfile do | |||
defp astarte_required_modules(_) do | |||
[ | |||
{:astarte_core, github: "astarte-platform/astarte_core"}, | |||
{:astarte_data_access, github: "astarte-platform/astarte_data_access"}, | |||
{:astarte_data_access, path: "/home/ghio/Documents/astarte_data_access"}, |
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.
🤔
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.
sorry!
docker-compose.dev.yml
Outdated
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.
This change is not related, please remove from this PR
d512f14
to
408a9ab
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #999 +/- ##
==========================================
+ Coverage 69.40% 71.26% +1.85%
==========================================
Files 263 249 -14
Lines 7119 6312 -807
==========================================
- Hits 4941 4498 -443
+ Misses 2178 1814 -364 ☔ View full report in Codecov by Sentry. |
408a9ab
to
9c8cf39
Compare
@@ -84,7 +85,7 @@ defmodule Astarte.Housekeeping.ReleaseTasks do | |||
end | |||
|
|||
defp wait_connection_and_check_astarte_keyspace(retries \\ 60) do | |||
case Queries.is_astarte_keyspace_existing() do | |||
case Keyspace.keyspace_existing?("astarte") do |
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.
could be shortened as
case Keyspace.keyspace_existing?("astarte") do | |
with {:error, :database_connection_error} <- Keyspace.keyspace_existing?("astarte") do | |
if retries > 0 do | |
:timer.sleep(1000) | |
wait_connection_and_check_astarte_keyspace(retries - 1) | |
else | |
{:error, :database_connection_error} | |
end | |
end |
cause when 'with' can not match, it returns the value (so {:ok, _} or {:error, _})
What this PR does / why we need it:
After porting all
realm
operations intoastarte_dataaccess
,housekeeping
needs to be refactored using the newest apiNOTE: commit titles will be fixed after other changes