Skip to content

feat(status_events): update values on startup#49

Merged
stakach merged 12 commits intomasterfrom
feature/update_values_with_hooks
Nov 15, 2022
Merged

feat(status_events): update values on startup#49
stakach merged 12 commits intomasterfrom
feature/update_values_with_hooks

Conversation

@grkek
Copy link
Copy Markdown
Collaborator

@grkek grkek commented Nov 15, 2022

Updated shard versions and hook update_values function into the start and stop functions

@grkek grkek requested a review from stakach November 15, 2022 05:23
@PlaceOS PlaceOS deleted a comment from github-actions bot Nov 15, 2022
@PlaceOS PlaceOS deleted a comment from github-actions bot Nov 15, 2022
@github-actions
Copy link
Copy Markdown

Hey, your PR is titled Update values on start and stop.
This is not a valid conventional commit.
Since we use well-formed PR titles for our changelogs, not fixing this can introduce problems :'(

@github-actions
Copy link
Copy Markdown

Hey, your PR is titled Update values on start and stop.
This is not a valid conventional commit.
Since we use well-formed PR titles for our changelogs, not fixing this can introduce problems :'(

Comment thread src/source/status_events.cr Outdated
def update_values
PlaceOS::Model::Module.all.in_groups_of(64, reuse: true) do |modules|
modules.each do |mod|
store = PlaceOS::Driver::RedisStorage.new(mod.try(&.id) || raise Exception.new("Nil assertion failed since the module is Nil"))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should probably just skip over anything where mod.try(&.id) == nil
something like:

mod_id = mod.try(&.id)
next unless mod_id
store = PlaceOS::Driver::RedisStorage.new(mod_id)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Agreed, instead of raising that would be a much better outcome

@github-actions
Copy link
Copy Markdown

Hey, your PR is titled Update values on start and stop.
This is not a valid conventional commit.
Since we use well-formed PR titles for our changelogs, not fixing this can introduce problems :'(

@github-actions
Copy link
Copy Markdown

Hey, your PR is titled Update values on start and stop.
This is not a valid conventional commit.
Since we use well-formed PR titles for our changelogs, not fixing this can introduce problems :'(

@github-actions
Copy link
Copy Markdown

Hey, your PR is titled Update values on start and stop.
This is not a valid conventional commit.
Since we use well-formed PR titles for our changelogs, not fixing this can introduce problems :'(

@github-actions
Copy link
Copy Markdown

Hey, your PR is titled Update values on start and stop.
This is not a valid conventional commit.
Since we use well-formed PR titles for our changelogs, not fixing this can introduce problems :'(

@github-actions
Copy link
Copy Markdown

Hey, your PR is titled Update values on start and stop.
This is not a valid conventional commit.
Since we use well-formed PR titles for our changelogs, not fixing this can introduce problems :'(

@github-actions
Copy link
Copy Markdown

Hey, your PR is titled Update values on start and stop.
This is not a valid conventional commit.
Since we use well-formed PR titles for our changelogs, not fixing this can introduce problems :'(

@github-actions
Copy link
Copy Markdown

Hey, your PR is titled Update values on start and stop.
This is not a valid conventional commit.
Since we use well-formed PR titles for our changelogs, not fixing this can introduce problems :'(

@github-actions
Copy link
Copy Markdown

Hey, your PR is titled Update values on start and stop.
This is not a valid conventional commit.
Since we use well-formed PR titles for our changelogs, not fixing this can introduce problems :'(

@stakach stakach changed the title Update values on start and stop feat(status_events): update values on startup Nov 15, 2022
@stakach stakach merged commit aa725e6 into master Nov 15, 2022
@stakach stakach deleted the feature/update_values_with_hooks branch November 15, 2022 11:16
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