-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1_1_testCreateRec.py
74 lines (57 loc) · 1.97 KB
/
1_1_testCreateRec.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#########################################################
#### Written By: SATYAKI DE ####
#### Written On: 27-Jun-2023 ####
#### Modified On 28-Sep-2023 ####
#### ####
#### Objective: This is the main class that creates ####
#### documents based on the historical data. ####
#### ####
#########################################################
from clsConfigClient import clsConfigClient as cf
import clsL as log
import clsCreateList as ccl
from datetime import datetime, timedelta
# Disbling Warning
def warn(*args, **kwargs):
pass
import warnings
warnings.warn = warn
###############################################
### Global Section ###
###############################################
#Initiating Logging Instances
clog = log.clsL()
cl = ccl.clsCreateList()
var = datetime.now().strftime(".%H.%M.%S")
documents = []
###############################################
### End of Global Section ###
###############################################
def main():
try:
var = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
print('*'*120)
print('Start Time: ' + str(var))
print('*'*120)
print('*'*240)
print('Creating Index store:: ')
print('*'*240)
documents = cl.createRec()
print('Inserted Sample Records: ')
print(str(documents))
print('\n')
r1 = len(documents)
if r1 > 0:
print()
print('Successfully Indexed sample records!')
else:
print()
print('Failed to sample Indexed recrods!')
print('*'*120)
var1 = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
print('End Time: ' + str(var1))
except Exception as e:
x = str(e)
print('Error: ', x)
if __name__ == '__main__':
main()