No project description provided
Project description
Runs functions concurrently in the background,
scheduled and with timeout/retries if they get
stuck.
Home-page: https://paulopes.github.io/running/
Author: Paulo Lopes
Author-email: palopes@cisco.com
License: UNKNOWN
Description: About **runningtrack**
======================
The runningtrack package runs functions in background processes, using a schedule,
and with a timeout/retry capability.
**runningtrack** is a Python package that allows you to launch functions in
background processes, at scheduled weekdays and times, multiple times a
day if necessary, and should a function take longer than a certain
timeout to complete then the function will be terminated and launched
again.
Schedules, timeouts, retries are configurable.
Example
-------
.. code:: python
import runners
def main(*argv):
import runningtrack
groups = (
runningtrack.Group("cl1").run(
# Functions to be launched in parallel:
runners.pub,
runners.sub1a,
runners.sub1b,
# Everyday at this time:
).at("12:30"),
runningtrack.Group("cl3").run(
# Functions to be launched in parallel:
runners.pub,
runners.sub1a,
# Every Monday at these two times:
).monday("0:45 12:45"),
)
# Use the 'now' parameter to bypass the schedule
# runnning all runner groups at once and just once.
if len(argv) > 1 and argv[1].lower() == 'now':
runningtrack.now(*groups)
else:
runningtrack.info()
runningtrack.wait(*groups)
if __name__ == "__main__":
from sys import argv
main(*argv)
License
-------
Licensed under the Apache License, Version 2.0
Platform: UNKNOWN
scheduled and with timeout/retries if they get
stuck.
Home-page: https://paulopes.github.io/running/
Author: Paulo Lopes
Author-email: palopes@cisco.com
License: UNKNOWN
Description: About **runningtrack**
======================
The runningtrack package runs functions in background processes, using a schedule,
and with a timeout/retry capability.
**runningtrack** is a Python package that allows you to launch functions in
background processes, at scheduled weekdays and times, multiple times a
day if necessary, and should a function take longer than a certain
timeout to complete then the function will be terminated and launched
again.
Schedules, timeouts, retries are configurable.
Example
-------
.. code:: python
import runners
def main(*argv):
import runningtrack
groups = (
runningtrack.Group("cl1").run(
# Functions to be launched in parallel:
runners.pub,
runners.sub1a,
runners.sub1b,
# Everyday at this time:
).at("12:30"),
runningtrack.Group("cl3").run(
# Functions to be launched in parallel:
runners.pub,
runners.sub1a,
# Every Monday at these two times:
).monday("0:45 12:45"),
)
# Use the 'now' parameter to bypass the schedule
# runnning all runner groups at once and just once.
if len(argv) > 1 and argv[1].lower() == 'now':
runningtrack.now(*groups)
else:
runningtrack.info()
runningtrack.wait(*groups)
if __name__ == "__main__":
from sys import argv
main(*argv)
License
-------
Licensed under the Apache License, Version 2.0
Platform: UNKNOWN
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
runningtrack-0.4.1.tar.gz
(17.6 kB
view hashes)
Built Distribution
Close
Hashes for runningtrack-0.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 823796ce567386e298b314e6bf4a7003e5a6792ad55c208383129989e77fb2d0 |
|
MD5 | bf831ddb0a6a1631259728a1f98d5b07 |
|
BLAKE2b-256 | 2a80907ba53ad515826edd9751415bec028c4ef1ff1a068279e61605d8c41233 |