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

Place results in subdirs #7

Merged
merged 1 commit into from
Feb 28, 2023
Merged

Place results in subdirs #7

merged 1 commit into from
Feb 28, 2023

Conversation

kousu
Copy link
Member

@kousu kousu commented Feb 24, 2023

Subdirs are simply named by taking the prefix of the input UUID.

This is a common technique to prevent the chance of overflowing filesystem limits on the number of files allowed in a single directory.

e.g.

Before

After:

** Follows #6 **

@kousu kousu requested a review from mguaypaq February 24, 2023 16:52
@kousu kousu marked this pull request as draft February 24, 2023 16:52
@kousu kousu force-pushed the output-subdirs branch 2 times, most recently from 1d5d889 to 5c7289b Compare February 24, 2023 17:03
@kousu kousu force-pushed the shorten-env branch 2 times, most recently from 9ca56aa to 6d9aec7 Compare February 25, 2023 04:14
if err != nil {
return stateError, err
}
stdout, err := os.OpenFile(resultPath, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0640)
Copy link
Member Author

Choose a reason for hiding this comment

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

I slipped in changing the permissions here to mimic the 0750 on the directory.

@kousu kousu mentioned this pull request Feb 25, 2023
Base automatically changed from shorten-env to main February 27, 2023 20:57
@kousu kousu marked this pull request as ready for review February 27, 2023 21:07
Subdirs are simply named by taking the prefix of the input UUID.

This is a common technique to prevent the chance of overflowing filesystem
limits on the number of files allowed in a single directory.

e.g.

Before
 - /srv/gitea/custom/public/90fa9a89-5e50-4bd4-834d-d42655e1ee8e.html
 - http://127.0.0.1:3000/assets/90fa9a89-5e50-4bd4-834d-d42655e1ee8e.html

After:
 - /srv/gitea/custom/public/bids-validator/84/b1/84b10e1c-b188-41e2-a92d-fb6ded9c6889.html
 - http://127.0.0.1:3000/assets/bids-validator/84/b1/84b10e1c-b188-41e2-a92d-fb6ded9c6889.html
Copy link
Member

@mguaypaq mguaypaq left a comment

Choose a reason for hiding this comment

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

Good thinking!

@mguaypaq mguaypaq merged commit 5d3f078 into main Feb 28, 2023
@mguaypaq mguaypaq deleted the output-subdirs branch February 28, 2023 18:56
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