From a0a85a013a52787647cb714e4951c43cba1b3c41 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sat, 17 Nov 2007 09:32:03 +0000 Subject: First cut at CRL/manifest regeneration cron job svn path=/scripts/README; revision=1312 --- scripts/rpkid.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scripts/rpkid.py') diff --git a/scripts/rpkid.py b/scripts/rpkid.py index 4cfd295a..74ba77c1 100755 --- a/scripts/rpkid.py +++ b/scripts/rpkid.py @@ -13,6 +13,7 @@ import rpki.resource_set, rpki.up_down, rpki.left_right, rpki.x509 import rpki.https, rpki.config, rpki.cms, rpki.exceptions, rpki.relaxng def left_right_handler(query, path): + """Process one left-right PDU.""" try: q_elt = rpki.cms.xml_verify(query, gctx.cms_ta_irbe) rpki.relaxng.left_right.assertValid(q_elt) @@ -26,6 +27,7 @@ def left_right_handler(query, path): return 500, "Unhandled exception %s" % data def up_down_handler(query, path): + """Process one up-down PDU.""" try: child_id = path.partition("/up-down/")[2] if not child_id.isdigit(): @@ -39,8 +41,13 @@ def up_down_handler(query, path): return 400, "Could not process PDU: %s" % data def cronjob_handler(query, path): + """Periodic tasks. As simple as possible for now, may need to break + this up into separate handlers later. + """ for s in rpki.left_right.self_elt.sql_fetch_all(gctx): s.client_poll(gctx) + s.update_children(gctx) + s.regenerate_crls_and_manifests(gctx) return 200, "OK" class global_context(object): -- cgit v1.2.3