Page MenuHomeDevCentral

Improve code readability: 8 Mb, restart operation
ClosedPublic

Authored by xcombelle on Aug 6 2016, 19:49.
Referenced Files
F3951318: D602.diff
Sat, Dec 28, 06:52
Unknown Object (File)
Tue, Dec 17, 03:22
Unknown Object (File)
Mon, Dec 16, 11:19
Unknown Object (File)
Sat, Dec 14, 12:51
Unknown Object (File)
Wed, Dec 11, 02:45
Unknown Object (File)
Wed, Dec 11, 02:45
Unknown Object (File)
Wed, Dec 11, 02:45
Unknown Object (File)
Wed, Dec 11, 02:45

Details

Summary

This change improves clarity of code:

  • An unit was expressed in bytes, requiring to know 1024 multiples to figure it.
  • Explain the sv restart phd line at the end.
Test Plan
$ sh
$ echo $((8*1024*1024))
8388608  

Diff Detail

Repository
rDPHAB Docker image for Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

xcombelle retitled this revision from to replace magic number of 8Mo and add comment.
xcombelle updated this object.
xcombelle edited the test plan for this revision. (Show Details)
xcombelle added a reviewer: dereckson.

Test plan is what has been used to check.

Personally, I did that:

ysul
$ sh
$ echo $((8*1024*1024))
8388608  
files/usr/local/bin/setup-phabricator
50

If we want to explain final steps what about somehing like this?

# We're done with configuration.
# Final step is to restart the Phabricator daemons to refresh configuration.
# The .initialized file means "this script has been launched and succeeded".

I wonder if the shell variables should not be quoted for example

"$MYSQL_ENV_MYSQL_ROOT_PASSWORD" instead of $MYSQL_ENV_MYSQL_ROOT_PASSWORD

to take account that they could contain shell separator such as space

files/usr/local/bin/setup-phabricator
50

looks good.
maybe the second sentence should be

# Final step is to restart the Phabricator daemons to reload configuration.

(reload instead of refresh)

dereckson retitled this revision from replace magic number of 8Mo and add comment to Improve code readability: 8 Mb, restart operation.Aug 7 2016, 11:57
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson edited edge metadata.
xcombelle updated this object.
xcombelle edited the test plan for this revision. (Show Details)
  • adding quote to command arguments

The purpose of this commit is to avoid interpretation of special
character by shell

dereckson edited edge metadata.
This revision is now accepted and ready to land.Aug 18 2016, 22:58
dereckson edited edge metadata.

Rebased against master.

This revision was automatically updated to reflect the committed changes.