From: "Antanas Ursulis" <antanas.ursulis@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/log-analysis:master commit in: /
Date: Mon, 29 Jul 2013 22:40:32 +0000 (UTC) [thread overview]
Message-ID: <1375137411.a436a8360d42232c1285e0979f3c561579bba591.uranium@gentoo> (raw)
commit: a436a8360d42232c1285e0979f3c561579bba591
Author: Antanas Uršulis <antanas.ursulis <AT> gmail <DOT> com>
AuthorDate: Mon Jul 29 22:36:51 2013 +0000
Commit: Antanas Ursulis <antanas.ursulis <AT> gmail <DOT> com>
CommitDate: Mon Jul 29 22:36:51 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/log-analysis.git;a=commit;h=a436a836
Add hostname to schema
---
database.py | 4 ++--
portage_processor.py | 3 ++-
schema.sql | 1 +
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/database.py b/database.py
index 5202876..79ae693 100644
--- a/database.py
+++ b/database.py
@@ -11,9 +11,9 @@ class DatabaseConnection:
self.conn.commit()
return c.lastrowid
- def insert_group(self, name, provider, date):
+ def insert_group(self, hostname, name, provider, date):
with closing(self.conn.cursor()) as c:
- c.execute("insert into `groups` (`name`, `provider`, `date`) values (%s, %s, %s)", (name, provider, date))
+ c.execute("insert into `groups` (`hostname`, `name`, `provider`, `date`) values (%s, %s, %s, %s)", (hostname, name, provider, date))
self.conn.commit()
return c.lastrowid
diff --git a/portage_processor.py b/portage_processor.py
index 66fb970..32ca9c4 100644
--- a/portage_processor.py
+++ b/portage_processor.py
@@ -14,7 +14,8 @@ class PortageProcessor:
self.storage = storage
def process(self, request, source, db):
- group_id = db.insert_group(request.group_name, 'portage', int(time.time()))
+ group_id = db.insert_group(source, request.group_name, 'portage', int(time.time()))
+
for f in request.files:
matches = 0
pkg_failed = False
diff --git a/schema.sql b/schema.sql
index 564385e..6b418a8 100644
--- a/schema.sql
+++ b/schema.sql
@@ -6,6 +6,7 @@ create table if not exists `files` (
create table if not exists `groups` (
`id` int primary key auto_increment,
+ `hostname` varchar(255) not null,
`name` text not null,
`provider` varchar(16) not null,
`date` int not null
next reply other threads:[~2013-07-29 22:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-29 22:40 Antanas Ursulis [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-07-29 22:40 [gentoo-commits] proj/log-analysis:master commit in: / Antanas Ursulis
2013-07-29 22:40 Antanas Ursulis
2013-07-29 18:59 Antanas Ursulis
2013-07-29 16:08 Antanas Ursulis
2013-07-29 16:08 Antanas Ursulis
2013-07-29 16:08 Antanas Ursulis
2013-07-29 16:08 Antanas Ursulis
2013-07-05 0:00 Antanas Ursulis
2013-07-05 0:00 Antanas Ursulis
2013-07-04 1:39 Antanas Ursulis
2013-07-03 7:15 Antanas Ursulis
2013-07-03 7:15 Antanas Ursulis
2013-07-03 7:15 Antanas Ursulis
2013-07-03 7:15 Antanas Ursulis
2013-07-03 7:15 Antanas Ursulis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1375137411.a436a8360d42232c1285e0979f3c561579bba591.uranium@gentoo \
--to=antanas.ursulis@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox