bin/cubicweb-ctl.bat
author Philippe Pepiot <ph@itsalwaysdns.eu>
Tue, 31 Mar 2020 19:15:03 +0200
changeset 12957 0c973204033a
parent 5499 2a5cc708c2a0
permissions -rw-r--r--
[server] prevent returning closed cursor to the database pool In since c8c6ad8 init_repository use repo.internal_cnx() instead of repo.system_source.get_connection() so it use the pool and we should not close cursors from the pool before returning it back. Otherwise we may have "connection already closed" error. This bug only trigger when connection-pool-size = 1. Since we are moving to use a dynamic pooler we need to get this fixed. This does not occur with sqlite since the connection wrapper instantiate new cursor everytime, but this occur with other databases.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3116
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     1
@echo off
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     2
rem = """-*-Python-*- script
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     3
rem -------------------- DOS section --------------------
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     4
rem You could set PYTHONPATH or TK environment variables here
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     5
python -x "%~f0" %*
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     6
goto exit
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     7
 
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     8
"""
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     9
# -------------------- Python section --------------------
4096
871ff503c23e update sys.path at cubicweb startup
Administrator <>
parents: 3116
diff changeset
    10
import sys
5499
2a5cc708c2a0 fixed bug of non-normalized path under Windows, that broke the reload mechanism
egazoni
parents: 4096
diff changeset
    11
from os.path import join, dirname, normpath
2a5cc708c2a0 fixed bug of non-normalized path under Windows, that broke the reload mechanism
egazoni
parents: 4096
diff changeset
    12
sys.path.insert(0, normpath(join(dirname(__file__), '..', '..')))
3116
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
    13
from cubicweb.cwctl import run
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
    14
run(sys.argv[1:])
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
    15
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
    16
DosExitLabel = """
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
    17
:exit
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
    18
rem """
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
    19
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
    20