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

fix: service falling down #499

Merged
merged 3 commits into from
Sep 18, 2024
Merged

fix: service falling down #499

merged 3 commits into from
Sep 18, 2024

Conversation

braianj
Copy link
Contributor

@braianj braianj commented Sep 18, 2024

No description provided.

@braianj braianj requested a review from aleortega September 18, 2024 15:55
@braianj braianj self-assigned this Sep 18, 2024
@braianj braianj added the bug Something isn't working label Sep 18, 2024
if (!exists) {
await components.downloadQueue.onSizeLessThan(1000)
const isSnsEntityToSend =
!!(entity.entityType === 'scene' || entity.entityType === 'wearable' || entity.entityType === 'emote') &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
!!(entity.entityType === 'scene' || entity.entityType === 'wearable' || entity.entityType === 'emote') &&
(entity.entityType === 'scene' || entity.entityType === 'wearable' || entity.entityType === 'emote') &&

Copy link
Contributor Author

@braianj braianj Sep 18, 2024

Choose a reason for hiding this comment

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

components.sns.arn could be a string or undefined, so with !! we are foncing a boolean
myabe like this is getter

const isSnsEntityToSend = !!(
          (entity.entityType === 'scene' || entity.entityType === 'wearable' || entity.entityType === 'emote') &&
          components.sns.arn
        )

Copy link
Contributor

Choose a reason for hiding this comment

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

WDYT about using the !! just in the components.sns.arn?

!!(entity.entityType === 'scene' || entity.entityType === 'wearable' || entity.entityType === 'emote') &&
components.sns.arn
const isSnsEventToSend = !!components.sns.eventArn
if (exists || !(isSnsEntityToSend && isSnsEventToSend)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think this could be easier to read?

Suggested change
if (exists || !(isSnsEntityToSend && isSnsEventToSend)) {
if (exists || !isSnsEntityToSend || !isSnsEventToSend) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to specify that both isSnsEntityToSend and isSnsEventToSend are false

Copy link
Contributor

Choose a reason for hiding this comment

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

Using !(isSnsEntityToSend && isSnsEventToSend), if any of isSnsEntityToSend or isSnsEventToSend are false, then !(isSnsEntityToSend && isSnsEventToSend) will be true. If both of them must be false then I think we should use ``(!isSnsEntityToSend && !isSnsEventToSend)`. WDYT?

@braianj braianj merged commit b6b169e into main Sep 18, 2024
5 checks passed
@braianj braianj deleted the fix/container-falling branch September 18, 2024 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants