-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
python-support.sh
46 lines (33 loc) · 1018 Bytes
/
python-support.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
SRC=$(cd $(dirname "$0"); pwd)
source "${SRC}/../include.sh"
cd $file_path/extra-lang
#
# Config file
#
$pm2 start app-python.config.js --only 'echo-python-1'
should 'should mode be fork' 'fork_mode' 1
should 'should have started 1 apps' 'online' 1
$pm2 delete all
# Check with multi instances
$pm2 start app-python.config.js --only 'echo-python-max'
should 'should mode be fork' 'fork_mode' 4
should 'should have started 4 apps' 'online' 4
# Should keep same params on restart
$pm2 restart all
should 'should have restarted processes' 'restart_time: 1' 4
should 'should mode be fork' 'fork_mode' 4
$pm2 delete all
#
# CLI
#
$pm2 start echo.py
should 'should mode be fork' 'fork_mode' 1
should 'should have started 1 apps' 'online' 1
$pm2 delete all
$pm2 start echo.py -i 4
should 'should mode be fork' 'fork_mode' 4
should 'should have started 4 apps' 'online' 4
$pm2 restart all
should 'should have restarted processes' 'restart_time: 1' 4
should 'should mode be fork' 'fork_mode' 4