backend/satellite_tools/reposync.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 24c19218334a1cd858994bb62bd8759f3cab5537
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed Sep 15 11:54:52 2010 -0400
629986 - updating channels last synced time from spacewalk-repo-sync commandline
diff --git a/backend/satellite_tools/reposync.py b/backend/satellite_tools/reposync.py
index df24f12..c2ac6e7 100644
--- a/backend/satellite_tools/reposync.py
+++ b/backend/satellite_tools/reposync.py
@@ -104,9 +104,17 @@ class RepoSync:
if self.regen:
taskomatic.add_to_repodata_queue_for_channel_package_subscription(
[self.channel_label], [], "server.app.yumreposync")
- rhnSQL.commit()
+ self.update_date()
+ rhnSQL.commit()
self.print_msg("Sync complete")
+
+ def update_date(self):
+ """ Updates the last sync time"""
+ h = rhnSQL.prepare( """update rhnChannel set LAST_SYNCED =
sysdate
+ where label = :channel""")
+ h.execute(channel=self.channel['label'])
+
def process_args(self):
self.parser = OptionParser()
self.parser.add_option('-u', '--url', action='store',
dest='url', help='The url to sync')
Show replies by date