mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Qual: Improve dol_syslog (#30782)
* Qual: 🛟 Fix reference to $db with $this->db
# Qual: reference to $db with $this->db
$db was undeclared, use $this->db.
* Fix suspected issue with environment max size and md5sum working on limited files
* Qual: Fix LDAP typing
* Qual: Improve dol_syslog
# Qual: Improve dol_syslog
The changes:
- Keep the log file open for less time (better for concurrency);
- Open the log file only to append data (no internal preparation for writing);
- Avoids re-assigning a constant array;
- Add PHPDoc information about the array parameters and return values;
- May reduce the computation of global settings;
- Result in a slight performance improvement.
This commit is contained in:
@@ -129,6 +129,14 @@ if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; the
|
||||
${SUDO} "${MYSQL}" -u "$DB_ROOT" -h 127.0.0.1 $PASS_OPT -e 'FLUSH PRIVILEGES;'
|
||||
|
||||
sum=$(find "${TRAVIS_BUILD_DIR}/htdocs/install" -type f -exec md5sum {} + | LC_ALL=C sort | md5sum)
|
||||
cnt=$(find "${TRAVIS_BUILD_DIR}/htdocs/install" -type f -exec md5sum {} + | wc)
|
||||
echo "OLDSUM $sum COUNT:$cnt"
|
||||
|
||||
# shellcheck disable=2046
|
||||
sum=$(md5sum $(find "${TRAVIS_BUILD_DIR}/htdocs/install" -type f) | LC_ALL=C sort | md5sum)
|
||||
# shellcheck disable=2046
|
||||
cnt=$(md5sum $(find "${TRAVIS_BUILD_DIR}/htdocs/install" -type f) | wc)
|
||||
echo "NEWSUM $sum COUNT:$cnt"
|
||||
load_cache=0
|
||||
if [ -r "$DB_CACHE_FILE".md5 ] && [ -r "$DB_CACHE_FILE" ] && [ -x "$(which "${MYSQLDUMP}")" ] ; then
|
||||
cache_sum="$(<"$DB_CACHE_FILE".md5)"
|
||||
|
||||
Reference in New Issue
Block a user