GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 87fa1b...0600e6 )
by P.R.
03:23
created

daemonize()   C

Complexity

Conditions 8

Size

Total Lines 51

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 64.3228

Importance

Changes 3
Bugs 0 Features 0
Metric Value
cc 8
c 3
b 0
f 0
dl 0
loc 51
ccs 1
cts 24
cp 0.0417
crap 64.3228
rs 5.2591

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1 1
import os
2
3
# ----------------------------------------------------------------------------------------------------------------------
4 1
HOME = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))
5
6 1
CONTROLLER_PULL_END_POINT = 'tcp://127.0.0.1:7771'
7 1
CONTROLLER_LOCKSTEP_END_POINT = 'tcp://127.0.0.1:7772'
8 1
LOGGER_PULL_END_POINT = 'tcp://127.0.0.1:7773'
9 1
SPAWNER_PULL_END_POINT = 'tcp://127.0.0.1:7774'
10
11 1
MYSQL_HOSTNAME = '127.0.0.1'
12 1
MYSQL_USERNAME = 'enarksh_owner'
13 1
MYSQL_PASSWORD = 'cH5thast2stebeT3'
14 1
MYSQL_SCHEMA = 'enarksh'
15 1
MYSQL_PORT = 3306
16
17 1
CHUNK_SIZE = 1024 * 1024
18
19 1
ENK_RST_ID_COMPLETED = 3
20 1
ENK_RST_ID_ERROR = 4
21 1
ENK_RST_ID_QUEUED = 5
22 1
ENK_RST_ID_RUNNING = 2
23 1
ENK_RST_ID_WAITING = 1
24
25 1
ENK_ACT_ID_TRIGGER = 1
26 1
ENK_ACT_ID_RESTART = 2
27 1
ENK_ACT_ID_RESTART_FAILED = 3
28
29 1
ENK_PTT_ID_INPUT = 1
30 1
ENK_PTT_ID_OUTPUT = 2
31
32 1
ENK_RWS_ID_NONE = 1
33 1
ENK_RWS_ID_READ = 2
34 1
ENK_RWS_ID_WRITE = 3
35
36 1
ENK_RTP_ID_COUNTING = 1
37 1
ENK_RTP_ID_READ_WRITE = 2
38
39 1
ENK_CTP_ID_COUNTING = 1
40 1
ENK_CTP_ID_READ_WRITE = 2
41
42 1
ENK_NTP_SCHEDULE = 1
43 1
ENK_NTP_COMMAND_JOB = 2
44 1
ENK_NTP_COMPOUND_JOB = 3
45 1
ENK_NTP_MANUAL_TRIGGER = 4
46 1
ENK_NTP_TERMINATOR = 5
47 1
ENK_NTP_DYNAMIC_JOB = 6
48 1
ENK_NTP_DYNAMIC_OUTER_WORKER = 7
49 1
ENK_NTP_DYNAMIC_INNER_WORKER = 8
50
51 1
ENK_MESSAGE_ADMIN_DIR = os.path.join(HOME, 'var/lib/message/admin')
52 1
ENK_MESSAGE_CONTROLLER_DIR = os.path.join(HOME, 'var/lib/message/controller')
53 1
ENK_MESSAGE_LOGGER_DIR = os.path.join(HOME, 'var/lib/message/logger')
54 1
ENK_MESSAGE_SPAWNER_DIR = os.path.join(HOME, 'var/lib/message/spawner')
55 1
ENK_LOCK_DIR = os.path.join(HOME, 'var/lock')
56
57
# ----------------------------------------------------------------------------------------------------------------------
58