-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py
More file actions
39 lines (30 loc) · 1.09 KB
/
Copy pathsettings.py
File metadata and controls
39 lines (30 loc) · 1.09 KB
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
import logging.config
import os
from dotenv import load_dotenv
from collections import namedtuple
from config_log import LOGGER_CONFIG
load_dotenv()
logging.config.dictConfig(LOGGER_CONFIG)
_logger = logging.getLogger('script_logger')
RETRY_TIME = 60
DatePeriods = namedtuple('DatePeriods', 'starting_date finishing_date')
DATE_PERIODS = (
DatePeriods(starting_date=1, finishing_date=5),
DatePeriods(starting_date=5, finishing_date=10),
DatePeriods(starting_date=11, finishing_date=15),
DatePeriods(starting_date=16, finishing_date=20),
DatePeriods(starting_date=21, finishing_date=25),
DatePeriods(starting_date=26, finishing_date=31),
)
TIMEZONE = os.getenv('TIMEZONE')
TIMEOFFSETON = os.getenv('TIMEOFFSETON')
TIMEOFFSETOFF = os.getenv('TIMEOFFSETOFF')
LATITUDE = os.getenv('LATITUDE')
LONGITUDE = os.getenv('LONGITUDE')
Command = namedtuple('Command', 'ON OFF')
COMMAND = Command(ON=1, OFF=0)
XZONTTOKEN = os.getenv('XZONTTOKEN')
XZONTCLIENT = os.getenv('XZONTCLIENT')
CONTENTTYPE = 'application/json'
DEVICEID = int(os.getenv('DEVICEID'))
OBJECTID = int(os.getenv('OBJECTID'))