-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
src/adapters/deployer/index.ts
Outdated
if (!exists) { | ||
await components.downloadQueue.onSizeLessThan(1000) | ||
const isSnsEntityToSend = | ||
!!(entity.entityType === 'scene' || entity.entityType === 'wearable' || entity.entityType === 'emote') && |
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.
!!(entity.entityType === 'scene' || entity.entityType === 'wearable' || entity.entityType === 'emote') && | |
(entity.entityType === 'scene' || entity.entityType === 'wearable' || entity.entityType === 'emote') && |
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.
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
)
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.
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)) { |
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.
Do you think this could be easier to read?
if (exists || !(isSnsEntityToSend && isSnsEventToSend)) { | |
if (exists || !isSnsEntityToSend || !isSnsEventToSend) { |
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.
We need to specify that both isSnsEntityToSend
and isSnsEventToSend
are false
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.
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?
No description provided.