Skip to content

Conversation

@AuroraYolo
Copy link
Contributor

The implemented features include a specification for a maximum file size of log files to prevent them from becoming too large. Also, added a handler for SIGHUP signals in order to intuitive processes control. Furthermore, set Shanghai as the default timezone.

The implemented features include a specification for a maximum file size of log files to prevent them from becoming too large. Also, added a handler for SIGHUP signals in order to intuitive processes control. Furthermore, set Shanghai as the default timezone.
@codecov
Copy link

codecov bot commented Nov 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8c7a49c) 52.74% compared to head (14f08b3) 52.74%.

❗ Current head 14f08b3 differs from pull request most recent head 7d8234c. Consider uploading reports for the commit 7d8234c to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##                 ci     #225   +/-   ##
=========================================
  Coverage     52.74%   52.74%           
  Complexity     1023     1023           
=========================================
  Files            96       96           
  Lines         13056    13056           
=========================================
  Hits           6886     6886           
  Misses         6170     6170           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

何平 added 3 commits November 13, 2023 16:47
This commit removes unnecessary white spaces and refactors how worker execution checks are implemented in the 'dontdie' library. Instead of having separate if statements to check each worker's execution status (stderrWorker, sigintWorker, etc.), a single loop has been used to iterate over and check all workers. This change not only reduces redundancy but also improves code readability.
Extra line breaks have been added in the dontdie file to improve code readability. The changes don't modify any functionalities, they just aim to create a cleaner and more readable code structure.
SplFileInfo is added to check the size of the log file instead of using file_exists and filesize. This change provides a more object-oriented way to handle filesystem entities and creates cleaner and more readable code.
@twose twose changed the title Add file size limit and handle SIGHUP signal Handle SIGHUP signal in dontdie Nov 15, 2023
何平 added 2 commits November 16, 2023 10:41
Unused 'SplFileInfo' class and 'MAX_FILE_SIZE' constant have been removed. The feature to limit log file size was removed, too. Also, the function call 'date_default_timezone_set('Asia/Shanghai');' was removed, avoiding forced timezone setting to Asia/Shanghai.
}

date_default_timezone_set('Asia/Shanghai');

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

@twose twose merged commit 6508786 into swow:ci Nov 16, 2023
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