{"id":3077,"date":"2010-12-31T19:40:34","date_gmt":"2011-01-01T03:40:34","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/?p=3077"},"modified":"2010-12-31T19:40:34","modified_gmt":"2011-01-01T03:40:34","slug":"a-better-process-runner","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/a-better-process-runner\/","title":{"rendered":"A Better Process Runner"},"content":{"rendered":"<p>I was recently processing a huge corpus of data. It went like this: For each file in a large set, run <code>'cmdline-tool &lt;file&gt;'<\/code>, capture the output and log results to a database, including whether the tool crashed. I wrote it in Python. I have done this exact type of the thing enough times in Python that I&#8217;m starting to notice a pattern.<\/p>\n<p>Every time I start writing such a program, I always begin with using <a href=\"http:\/\/docs.python.org\/library\/commands.html\">Python&#8217;s commands module<\/a> because it&#8217;s the easiest thing to do. Then I always have to abandon the module when I remember the hard way that whatever &#8216;cmdline-tool&#8217; is, it might run errant and try to execute forever. That&#8217;s when I import (rather, copy over) my process runner from FATE, the one that is able to kill a process after it has been running too long. I have used this module enough times that I wonder if I should spin it off into a new Python module.<\/p>\n<p>Or maybe I&#8217;m going about this the wrong way. Perhaps when the data set reaches a certain size, I&#8217;m really supposed to throw it on some kind of distributed cluster rather than task it to a Python script (a multithreaded one, to be sure, but one that runs on a single machine). Running the job on a distributed architecture wouldn&#8217;t obviate the need for such early termination. But hopefully, such architectures already have that functionality built in. It&#8217;s something to research in the new year.<\/p>\n<p>I guess there are also process limits, enforced by the shell. I don&#8217;t think I have ever gotten those to work correctly, though.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was recently processing a huge corpus of data. It went like this: For each file in a large set, run &#8216;cmdline-tool &lt;file&gt;&#8217;, capture the output and log results to a database, including whether the tool crashed. I wrote it in Python. I have done this exact type of the thing enough times in Python [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[],"class_list":["post-3077","post","type-post","status-publish","format-standard","hentry","category-python"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"I was recently processing a huge corpus of data. It went like this: For each file in a large set, run &#039;cmdline-tool &#039;, capture the output and log results to a database, including whether the tool crashed. I wrote it in Python. I have done this exact type of the thing enough times in Python\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Multimedia Mike\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/multimedia.cx\/eggs\/a-better-process-runner\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Breaking Eggs And Making Omelettes | Topics On Multimedia Technology and Reverse Engineering\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"A Better Process Runner | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta property=\"og:description\" content=\"I was recently processing a huge corpus of data. It went like this: For each file in a large set, run &#039;cmdline-tool &#039;, capture the output and log results to a database, including whether the tool crashed. I wrote it in Python. I have done this exact type of the thing enough times in Python\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/multimedia.cx\/eggs\/a-better-process-runner\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2011-01-01T03:40:34+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2011-01-01T03:40:34+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"A Better Process Runner | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta name=\"twitter:description\" content=\"I was recently processing a huge corpus of data. It went like this: For each file in a large set, run &#039;cmdline-tool &#039;, capture the output and log results to a database, including whether the tool crashed. I wrote it in Python. I have done this exact type of the thing enough times in Python\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/a-better-process-runner\\\/#article\",\"name\":\"A Better Process Runner | Breaking Eggs And Making Omelettes\",\"headline\":\"A Better Process Runner\",\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"},\"datePublished\":\"2010-12-31T19:40:34-08:00\",\"dateModified\":\"2010-12-31T19:40:34-08:00\",\"inLanguage\":\"en-US\",\"commentCount\":4,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/a-better-process-runner\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/a-better-process-runner\\\/#webpage\"},\"articleSection\":\"Python\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/a-better-process-runner\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/python\\\/#listItem\",\"name\":\"Python\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/python\\\/#listItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/python\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/a-better-process-runner\\\/#listItem\",\"name\":\"A Better Process Runner\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/a-better-process-runner\\\/#listItem\",\"position\":3,\"name\":\"A Better Process Runner\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/python\\\/#listItem\",\"name\":\"Python\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\",\"name\":\"Breaking Eggs And Making Omelettes\",\"description\":\"Topics On Multimedia Technology and Reverse Engineering\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/\",\"name\":\"Multimedia Mike\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/a-better-process-runner\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2eb93f7cada658f7986b5092062849fa255779eada3342c8f6b9a40764b95fdd?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Multimedia Mike\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/a-better-process-runner\\\/#webpage\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/a-better-process-runner\\\/\",\"name\":\"A Better Process Runner | Breaking Eggs And Making Omelettes\",\"description\":\"I was recently processing a huge corpus of data. It went like this: For each file in a large set, run 'cmdline-tool ', capture the output and log results to a database, including whether the tool crashed. I wrote it in Python. I have done this exact type of the thing enough times in Python\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/a-better-process-runner\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"datePublished\":\"2010-12-31T19:40:34-08:00\",\"dateModified\":\"2010-12-31T19:40:34-08:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/\",\"name\":\"Breaking Eggs And Making Omelettes\",\"description\":\"Topics On Multimedia Technology and Reverse Engineering\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"A Better Process Runner | Breaking Eggs And Making Omelettes","description":"I was recently processing a huge corpus of data. It went like this: For each file in a large set, run 'cmdline-tool ', capture the output and log results to a database, including whether the tool crashed. I wrote it in Python. I have done this exact type of the thing enough times in Python","canonical_url":"https:\/\/multimedia.cx\/eggs\/a-better-process-runner\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/multimedia.cx\/eggs\/a-better-process-runner\/#article","name":"A Better Process Runner | Breaking Eggs And Making Omelettes","headline":"A Better Process Runner","author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"},"datePublished":"2010-12-31T19:40:34-08:00","dateModified":"2010-12-31T19:40:34-08:00","inLanguage":"en-US","commentCount":4,"mainEntityOfPage":{"@id":"https:\/\/multimedia.cx\/eggs\/a-better-process-runner\/#webpage"},"isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/a-better-process-runner\/#webpage"},"articleSection":"Python"},{"@type":"BreadcrumbList","@id":"https:\/\/multimedia.cx\/eggs\/a-better-process-runner\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","position":1,"name":"Home","item":"https:\/\/multimedia.cx\/eggs","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/python\/#listItem","name":"Python"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/python\/#listItem","position":2,"name":"Python","item":"https:\/\/multimedia.cx\/eggs\/category\/python\/","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/a-better-process-runner\/#listItem","name":"A Better Process Runner"},"previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/a-better-process-runner\/#listItem","position":3,"name":"A Better Process Runner","previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/python\/#listItem","name":"Python"}}]},{"@type":"Organization","@id":"https:\/\/multimedia.cx\/eggs\/#organization","name":"Breaking Eggs And Making Omelettes","description":"Topics On Multimedia Technology and Reverse Engineering","url":"https:\/\/multimedia.cx\/eggs\/"},{"@type":"Person","@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author","url":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/","name":"Multimedia Mike","image":{"@type":"ImageObject","@id":"https:\/\/multimedia.cx\/eggs\/a-better-process-runner\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/2eb93f7cada658f7986b5092062849fa255779eada3342c8f6b9a40764b95fdd?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Multimedia Mike"}},{"@type":"WebPage","@id":"https:\/\/multimedia.cx\/eggs\/a-better-process-runner\/#webpage","url":"https:\/\/multimedia.cx\/eggs\/a-better-process-runner\/","name":"A Better Process Runner | Breaking Eggs And Making Omelettes","description":"I was recently processing a huge corpus of data. It went like this: For each file in a large set, run 'cmdline-tool ', capture the output and log results to a database, including whether the tool crashed. I wrote it in Python. I have done this exact type of the thing enough times in Python","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/#website"},"breadcrumb":{"@id":"https:\/\/multimedia.cx\/eggs\/a-better-process-runner\/#breadcrumblist"},"author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"creator":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"datePublished":"2010-12-31T19:40:34-08:00","dateModified":"2010-12-31T19:40:34-08:00"},{"@type":"WebSite","@id":"https:\/\/multimedia.cx\/eggs\/#website","url":"https:\/\/multimedia.cx\/eggs\/","name":"Breaking Eggs And Making Omelettes","description":"Topics On Multimedia Technology and Reverse Engineering","inLanguage":"en-US","publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"}}]},"og:locale":"en_US","og:site_name":"Breaking Eggs And Making Omelettes | Topics On Multimedia Technology and Reverse Engineering","og:type":"article","og:title":"A Better Process Runner | Breaking Eggs And Making Omelettes","og:description":"I was recently processing a huge corpus of data. It went like this: For each file in a large set, run 'cmdline-tool ', capture the output and log results to a database, including whether the tool crashed. I wrote it in Python. I have done this exact type of the thing enough times in Python","og:url":"https:\/\/multimedia.cx\/eggs\/a-better-process-runner\/","article:published_time":"2011-01-01T03:40:34+00:00","article:modified_time":"2011-01-01T03:40:34+00:00","twitter:card":"summary","twitter:title":"A Better Process Runner | Breaking Eggs And Making Omelettes","twitter:description":"I was recently processing a huge corpus of data. It went like this: For each file in a large set, run 'cmdline-tool ', capture the output and log results to a database, including whether the tool crashed. I wrote it in Python. I have done this exact type of the thing enough times in Python"},"aioseo_meta_data":{"post_id":"3077","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-31 21:50:06","updated":"2025-12-31 19:37:07","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/multimedia.cx\/eggs\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/multimedia.cx\/eggs\/category\/python\/\" title=\"Python\">Python<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tA Better Process Runner\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/multimedia.cx\/eggs"},{"label":"Python","link":"https:\/\/multimedia.cx\/eggs\/category\/python\/"},{"label":"A Better Process Runner","link":"https:\/\/multimedia.cx\/eggs\/a-better-process-runner\/"}],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/3077","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/comments?post=3077"}],"version-history":[{"count":2,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/3077\/revisions"}],"predecessor-version":[{"id":3079,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/3077\/revisions\/3079"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=3077"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=3077"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=3077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}