-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSkeletonCode.py
More file actions
57 lines (47 loc) · 1.28 KB
/
SkeletonCode.py
File metadata and controls
57 lines (47 loc) · 1.28 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
##!/usr/bin/python
"""
input_data_checker()
Input : Requester's Attachment
if a file appears at source code location:
if it is a zip file
unzip it
executeFileProcessing()
else
executeFileProcessing()
executeFileProcessing()
read & seperate meta data & CTN list
Send CTN list files to INPUT_CTN folder.
process the metadata received.
ValidateMetadata(data)
ValidateMetadata(data)
//Code to do validation of inputs .Return True if passed, else False.
If TRUE,
ftp_ctn_file()
SQLDataEntry(details to process)
else
emailNotification(Fail)
ConnectDB()
// Code to connect with DB//
ftp_ctn_file()
//Code to read list of CTN files
& FTP them to remote server//
SQLDataEntry()
if ValidateMetadata:
ConnectDB()
Generate Next Seq Val
Generate SQL at current location
Insert into database
return True
If SQLDataEntry :
emailNotification(True)
emailNotification(string)
read string.
If string is True:
Send passed email
move all input files to PASS folder
else
send Failure email to config team.
move input files to FAILURE Folder
no request received. Don't do anything.
Reports after scheduled date: Input - Seq number , req email ID, date of processing.
"""