Skip to main content

TaskRunner

Project description

taskrunner runs your methods until they stop failing.

Motivation

taskrunner is a crude way to force your methods to complete. This is particularly useful when functions can be expected to throw exceptions but shouldn’t stop execution. Effectively, taskrunner catches all exceptions and makes sure that the result is not in a list of excluded return values.

Installation

taskrunner is available via pip:

$ pip install taskrunner

Usage

from taskrunner import TaskRunner

def some_function_that_may_throw(some_argument, another_argument):
    # Do something

task_runner = TaskRunner()
result = task_runner.run_until_complete(target=some_function_that_may_throw, args=('123','456'))
print(result) # Hopefully something useful

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
task-runner-0.0.1.tar.gz (3.1 kB) Copy SHA256 hash SHA256 Source None Nov 16, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page