forked from ignatovv/tech-testing-ha1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpusher_config.py
47 lines (43 loc) · 996 Bytes
/
pusher_config.py
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
47
import sys
from codecs import getwriter
QUEUE_HOST = 'localhost'
QUEUE_PORT = 33013
QUEUE_SPACE = 0
QUEUE_TAKE_TIMEOUT = 0.1
QUEUE_TUBE = 'api.push_notifications'
HTTP_CONNECTION_TIMEOUT = 30
SLEEP = 0.1
SLEEP_ON_FAIL = 10
WORKER_POOL_SIZE = 10
LOGGING = {
'version': 1,
'formatters': {
'basic': {
'format': '%(asctime)s %(levelname)s %(threadName)s %(message)s'
}
},
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'level': 'DEBUG',
'stream': getwriter('utf-8')(sys.stderr),
'formatter': 'basic'
},
'null': {
'class': 'logging.NullHandler',
'level': 'DEBUG'
}
},
'loggers': {
'pusher': {
'handlers': ['console'],
'level': 'DEBUG',
'propagate': False,
}
},
'root': {
'propagate': False,
'handlers': ['console'],
'level': 'DEBUG',
},
}