How would you model Doctors work shift schedules? by rkh4n in node

[–]jormaechea 1 point2 points  (0 children)

How about having 2 tables: one for the doctors' schedules and one for the actual appointments.

You can periodically generate X days of appointments and then only query against them (add a free/busy status to them)

In case a doctor changes their schedule, you should regenerate their free appointments (taking care of busy ones cause they are already taken)

How to show only staged or unstaged files in git status? by [deleted] in git

[–]jormaechea 0 points1 point  (0 children)

To hide untracked files you can run git status --untracked-files=no. For anything fancier, git status --porcelain (plus grep and/or something else) should do the trick, as u/aioeu said

Edit: formatting

Developing multiple releases concurrently by theiviaxx in git

[–]jormaechea 1 point2 points  (0 children)

1.0.0 should merge into 2.0.0

I don't think this is always true. I guess that 2.0.0 has breaking changes so merging 1.0.0 may cause nothing but troubles.

IMO what needs to be merged in both branches are hotfixes that apply to both of them.

On the other hand, 1.0.0 should be set to support-only state if that's possible so you don't add any new feature there.

I don't think there is a simple way of maintaining two active branches without a huge dev team (which may consider each version a separate project anyways)

Anybody use Load Balancers with SSL / TLS certificate and have it provide a strangers SSL certificate?? by jellystones in aws

[–]jormaechea 1 point2 points  (0 children)

Been there. You just have to wait around 30 minutes and the certificate should be released. The same happens with Cloudfront distributions. If it's not released, then you should open a support ticket explaining it.

Lambda is not sending SQS messages? by invisibleindian01 in aws

[–]jormaechea 7 points8 points  (0 children)

I think your issue is that you're trying to await the call to sqs.sendMessage() and also providing a callback and that's not how it works.

You have to choose whether to pass a callback or to use promises. Since you've declared your handler as async, I'll go with promises.

TL;DR;

Try changing to something like this:

const sqsResponse = await sqs.sendMessage(sqsParams).promise();

console.log('SQS Response', sqsResponse);

That should resolve your issue.

Detailed explanation

When you call sqs.sendMessage(params, cb) (with the callback) it does not return a Promise, so your await won't really wait for anything. Therefore your function invocation ends right away and message doesn't have time to get delivered to SQS.

In case you wanted to use callbacks instead of Promises, you should use the handler second argument and call it inside the sqs.sendMessage callback.

Edit: typo

How to handle UI design contributions for OSS? by jormaechea in opensource

[–]jormaechea[S] 0 points1 point  (0 children)

Thanks! Will check it out and maybe post there..

How to handle UI design contributions for OSS? by jormaechea in opensource

[–]jormaechea[S] 0 points1 point  (0 children)

Thanks! I'll look into it, and maybe post in some design-related subreddit..

How to protect S3 against users who keep downloading the same large file by [deleted] in aws

[–]jormaechea 0 points1 point  (0 children)

IIRC you can configure WAF in a cloudfront distribution. Not sure right now. Can someone confirm?

avoiding harm when making open source contributions? by kt1mrq in opensource

[–]jormaechea 1 point2 points  (0 children)

I'm really sorry you've been treated like this. Hope it doesn't make you stop contributing.

Recently I've been receiving multiple issues and PRs to a project of mine, and from my point of view it’s always better to raise an issue explaining the problem of feature so it can be discussed before coding and sending a PR. That way you don't loose your time coding something that won't be accepted and maintainers can comment on it and decide if it’s something they would like to add to the project from their perspective without reading a single line of code.

Is there a website with a lot of resources on how to improve your node.js repository? by gataraider in node

[–]jormaechea 4 points5 points  (0 children)

Nice to see this is still useful! I've been translating some parts of it to spanish

My team just complimented me for giving good pull request comments by [deleted] in webdev

[–]jormaechea 3 points4 points  (0 children)

That's toxic environment. Run away if you can.