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


Download files

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

Source Distribution

task-runner-0.0.1.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file task-runner-0.0.1.tar.gz.

File metadata

  • Download URL: task-runner-0.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for task-runner-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2e8d9e9a3cbebfe9e073dcbad36002f8e93c3ee8582fb39f43aff8fe5c21f3c5
MD5 4b168d2476278517d9dd7e4728ae61b5
BLAKE2b-256 f36ab171152cb11e758b99ebbe04c49deaa8d453325d5d9de163b248e2e125fd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page