From: "Magnus Granberg" <zorry@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/tinderbox-cluster:master commit in: pym/tbc/
Date: Mon, 22 Feb 2016 18:11:21 +0000 (UTC) [thread overview]
Message-ID: <1456164712.7ee36aabda72a4f6006d0fb0810ba8be5e80d9c4.zorry@gentoo> (raw)
commit: 7ee36aabda72a4f6006d0fb0810ba8be5e80d9c4
Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 22 18:11:52 2016 +0000
Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Mon Feb 22 18:11:52 2016 +0000
URL: https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=7ee36aab
redone remove_old_cpv job
pym/tbc/old_cpv.py | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/pym/tbc/old_cpv.py b/pym/tbc/old_cpv.py
index cc80428..3c9ffd4 100644
--- a/pym/tbc/old_cpv.py
+++ b/pym/tbc/old_cpv.py
@@ -9,8 +9,7 @@ from sqlalchemy.orm import scoped_session, sessionmaker
from tbc.ConnectionManager import NewConnection
from tbc.readconf import read_config_settings
from tbc.sqlquerys import get_category_list_info, get_package_list_info, get_ebuild_list_info, \
- get_build_job_all, del_old_build_jobs, del_old_ebuild, add_old_package, del_old_package, \
- add_old_category
+ get_build_job_all, del_old_build_jobs, del_old_ebuild, del_old_package, add_old_category
def remove_old_ebuilds(package_id, config_id, tbc_settings, cp):
today = datetime.utcnow()
@@ -33,12 +32,13 @@ def remove_old_ebuilds(package_id, config_id, tbc_settings, cp):
del_old_build_jobs(session2, build_job.BuildJobId)
del_old_ebuild(session2, EbuildInfo.EbuildId)
if not get_ebuild_list_info(session2, package_id):
- add_old_package(session2, package_id)
+ log_msg = "Removing: %s" % (cp,)
+ write_log(session2, log_msg, "info", config_id, 'old_cpv.remove_old_cpv_ebuilds')
+ del_old_package(session2, package_id)
session2.close
Session.remove()
def remove_old_cpv_main(session, config_id):
- today = datetime.datetime.utcnow()
tbc_settings = read_config_settings()
# Use all cores when multiprocessing
#pool_cores = multiprocessing.cpu_count()
@@ -51,16 +51,9 @@ def remove_old_cpv_main(session, config_id):
PackagesInfo = get_package_list_info(session, CategoryInfo.CategoryId)
for PackageInfo in PackagesInfo:
cp = CategoryInfo.Category + '/' + PackageInfo.Package
- if PackageInfo.Active:
- # pool.apply_async( remove_old_ebuilds, (Package.PackageId, config_id, tbc_settings, cp,))
- # use this when debuging
- remove_old_ebuilds(PackageInfo.PackageId, config_id, tbc_settings, cp,)
- else:
- duration = today - PackageInfo.TimeStamp
- if duration.days > 30:
- log_msg = "Removing: %s" % (cp,)
- write_log(session2, log_msg, "info", config_id, 'old_cpv.remove_old_cpv_main')
- del_old_package(session, PackageInfo.PackageId)
+ # pool.apply_async( remove_old_ebuilds, (Package.PackageId, config_id, tbc_settings, cp,))
+ # use this when debuging
+ remove_old_ebuilds(PackageInfo.PackageId, config_id, tbc_settings, cp,)
#close and join the multiprocessing pools
# pool.close()
next reply other threads:[~2016-02-22 18:11 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 18:11 Magnus Granberg [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-02-05 2:52 [gentoo-commits] proj/tinderbox-cluster:master commit in: pym/tbc/ Magnus Granberg
2017-01-15 19:57 Magnus Granberg
2017-01-08 15:33 Magnus Granberg
2017-01-08 15:33 Magnus Granberg
2016-12-22 18:31 Magnus Granberg
2016-12-22 11:29 Magnus Granberg
2016-12-22 11:29 Magnus Granberg
2016-12-22 11:29 Magnus Granberg
2016-12-22 10:15 Magnus Granberg
2016-12-22 10:11 Magnus Granberg
2016-12-22 10:11 Magnus Granberg
2016-12-20 22:13 Magnus Granberg
2016-12-20 21:21 Magnus Granberg
2016-12-20 21:16 Magnus Granberg
2016-12-20 20:25 Magnus Granberg
2016-12-20 20:25 Magnus Granberg
2016-12-20 20:25 Magnus Granberg
2016-12-10 16:17 Magnus Granberg
2016-12-05 21:11 Magnus Granberg
2016-11-20 15:37 Magnus Granberg
2016-11-15 21:58 Magnus Granberg
2016-03-06 17:47 Magnus Granberg
2016-03-03 15:26 Magnus Granberg
2016-03-02 20:50 Magnus Granberg
2016-02-29 23:01 Magnus Granberg
2016-02-22 18:33 Magnus Granberg
2016-02-22 17:08 Magnus Granberg
2016-02-20 12:12 Magnus Granberg
2016-02-10 20:24 Magnus Granberg
2016-02-02 23:13 Magnus Granberg
2016-01-31 13:39 Magnus Granberg
2016-01-27 5:21 Magnus Granberg
2016-01-26 23:16 Magnus Granberg
2016-01-26 20:29 Magnus Granberg
2016-01-25 22:48 Magnus Granberg
2016-01-18 20:26 Magnus Granberg
2016-01-10 12:53 Magnus Granberg
2016-01-07 7:33 Magnus Granberg
2015-12-21 22:54 Magnus Granberg
2015-12-20 0:12 Magnus Granberg
2015-10-06 19:31 Magnus Granberg
2015-09-06 20:29 Magnus Granberg
2015-09-03 21:03 Magnus Granberg
2015-08-05 1:10 Magnus Granberg
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=1456164712.7ee36aabda72a4f6006d0fb0810ba8be5e80d9c4.zorry@gentoo \
--to=zorry@gentoo.org \
--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