forked from frappe/biometric-attendance-sync-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal_config.py.template
31 lines (25 loc) · 1.48 KB
/
local_config.py.template
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
# ERPNext related configs
ERPNEXT_API_KEY = ''
ERPNEXT_API_SECRET = ''
ERPNEXT_URL = 'http://dev.local:8000'
# operational configs
PULL_FREQUENCY = 60 # in minutes
LOGS_DIRECTORY = 'logs' # logs of this script is stored in this directory
IMPORT_START_DATE = None # format: '20190501'
DISABLE_PING = True # Omits the initial ping test for BMS device connectivity over the Internet
# Biometric device configs (all keys mandatory excluding `employee_attendance_ids`, `port`)
#- device_id - must be unique, strictly alphanumerical chars only. no space allowed.
#- ip - device IP Address
#- port - device port number, if unspecified defaults to 4370
#- punch_direction - 'IN'/'OUT'/'AUTO'/None
#- clear_from_device_on_fetch: if set to true then attendance is deleted after fetch is successful.
#(Caution: this feature can lead to data loss if used carelessly.)
#- employee_attendance_ids - if specified, only the included Employee Attendance IDs will be pushed to the server in the future syncs.
devices = [
{'device_id': 'test_1', 'ip': '192.168.0.209', 'punch_direction': None, 'clear_from_device_on_fetch': False},
{'device_id': 'test_2', 'ip': '192.168.2.209', 'port': 4370, 'punch_direction': None, 'clear_from_device_on_fetch': False, 'employee_attendance_ids': []}
]
# Configs updating sync timestamp in the Shift Type DocType
shift_type_device_mapping = [
{'shift_type_name': ['Shift1'], 'related_device_id': ['test_1','test_2']}
]