diff options
author | Antanas Uršulis <antanas.ursulis@gmail.com> | 2013-07-29 19:02:17 +0300 |
---|---|---|
committer | Antanas Uršulis <antanas.ursulis@gmail.com> | 2013-07-29 19:02:17 +0300 |
commit | 8dfea24b40c34292f20ab60975d3585094b70cb0 (patch) | |
tree | f80a5ff51470fcfc6ac8ff24412efda785ee5582 /simple_client.py | |
parent | Port simple_client to urllib2, so that we can set Content-Type (diff) | |
download | log-analysis-8dfea24b40c34292f20ab60975d3585094b70cb0.tar.gz log-analysis-8dfea24b40c34292f20ab60975d3585094b70cb0.tar.bz2 log-analysis-8dfea24b40c34292f20ab60975d3585094b70cb0.zip |
Introduce processors and PortageProcessor.
A processor is initialised with a database and storage provider. It
should implement the process(request, source) method, where request is a
protobuf Submission message. process() should analyse the received
files, perform any required transformations and should usually store the
files and create appropriate database entries.
Processors are multiplexed through the 'provider' variable in the
protobuf Submission message. This allows to process/analyse various
types of logs differently.
Diffstat (limited to 'simple_client.py')
-rw-r--r-- | simple_client.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/simple_client.py b/simple_client.py index 99a4116..ab4bccf 100644 --- a/simple_client.py +++ b/simple_client.py @@ -6,6 +6,7 @@ import submission_pb2, sys, urllib2, os def send_submission(filenames): submission = submission_pb2.Submission() + submission.provider = "portage" for f in filenames: new_file = submission.files.add() |