1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-05-13 02:15:59 +00:00

Support gc online ()

* Support gc online

* Delete check-db-type.py

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
feiniks 2024-11-21 10:33:08 +08:00 committed by GitHub
parent a207f33e60
commit 9c178886ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 0 additions and 36 deletions

View File

@ -784,7 +784,6 @@ def copy_scripts_and_libs():
must_copy(
os.path.join(scripts_srcdir, 'seafile-background-tasks.sh'), serverdir)
must_copy(os.path.join(scripts_srcdir, 'check_init_admin.py'), serverdir)
must_copy(os.path.join(scripts_srcdir, 'check-db-type.py'), serverdir)
# Command line for real-time backup server
must_copy(os.path.join(scripts_srcdir, 'seaf-backup-cmd.py'), serverdir)

View File

@ -1,23 +0,0 @@
import sys
from configparser import ConfigParser
if len(sys.argv) != 2:
print('check-db-type.py <seafile-config-file>', file=sys.stderr)
seafile_conf_file = sys.argv[1]
parser = ConfigParser()
parser.read(seafile_conf_file)
if not parser.has_option('database', 'type'):
print('sqlite')
else:
db_type = parser.get('database', 'type')
if db_type == 'sqlite':
print('sqlite')
elif db_type == 'mysql':
print('mysql')
elif db_type == 'pgsql':
print('pgsql')
else:
print('unknown')

View File

@ -8,7 +8,6 @@ TOPDIR=$(dirname "${INSTALLPATH}")
default_ccnet_conf_dir=${TOPDIR}/ccnet
default_seafile_data_dir=${TOPDIR}/seafile-data
default_conf_dir=${TOPDIR}/conf
check_db_py=${INSTALLPATH}/check-db-type.py
seaf_gc=${INSTALLPATH}/seafile/bin/seafserv-gc
seaf_gc_opts=""
pro_pylibs_dir=${INSTALLPATH}/pro/python
@ -119,17 +118,6 @@ function validate_already_running () {
function run_seaf_gc () {
if [[ $IS_PRO_SEAFEVENTS = "True" ]]; then
seafile_conf=${default_conf_dir}/seafile.conf
db_type=$($PYTHON $check_db_py $seafile_conf)
if [ $db_type = "sqlite" ]; then
validate_already_running;
fi
else
validate_already_running;
fi
validate_seafile_data_dir;
set_env_config;