Skip to content

Commit 70d3b89

Browse files
committed
Update readme
1 parent 93d8a29 commit 70d3b89

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Call Event Parser
2+
3+
## Introduction
4+
5+
This application processes sets of call data in a specific CSV format. The data is read, validated and then uploaded to a database. Once a file has been successfully processed it moved to a process directory. Any records that can not be processed form files are logged to the syslog.
6+
7+
This project is designed to be run as a back ground task.
8+
9+
## Config
10+
11+
The project is a CLI application and requires 9 arguments to be run. The variables that can be configured are:
12+
13+
- Database Username
14+
- Database Password
15+
- Database Host
16+
- Database Port
17+
- Database Name
18+
- Database Table
19+
- Process directory path (Where files will be moved when processed)
20+
- Upload directory path (Directory where incoming cvs files are located)
21+
- File running path (Path to a temport file that stops this application running in more than one process at a time)
22+
23+
24+
## Build and Run
25+
26+
To build this project run the following in the root of the project
27+
28+
`go install`
29+
30+
from you $GOPATH/bin directory run the application passingin the arguments
31+
32+
`./call-event-parser username password host port db_name db_table "./processed/" "./uploaded" "/tmp/call_event_parse_running"`
33+
34+
35+
### Things to note
36+
37+
The processed directory argument must include a '/' at the end. This is a bug that needs to be resolved. Make sure the application as read/write access to the `File running path` location.
38+
39+
40+
## Tests
41+
42+
This project contains test which can be run from the project root using
43+
44+
`go test ./...`

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func main() {
1616
args := os.Args[1:]
1717

1818
if !validArgs(args) {
19-
log("In valid command line arguments 8 required")
19+
log("In valid command line arguments 9 required")
2020
os.Exit(0)
2121
}
2222

0 commit comments

Comments
 (0)