This commit is contained in:
sankalp_j 2018-09-18 15:27:32 +05:30
parent fb3850d98d
commit 0d3916f1a6
2 changed files with 5 additions and 1 deletions

View file

@ -9,6 +9,10 @@ Inspired by this blog [`here`](https://www.g-loaded.eu/2016/11/24/how-to-termina
```sh ```sh
python setup.py install python setup.py install
``` ```
or
```sh
pip install git+git://github.com/sankalpjonn/looper.git
```
## writing a job looks like this ## writing a job looks like this

View file

@ -7,7 +7,7 @@ from helpers import service_shutdown
class Looper(): class Looper():
def __init__(self): def __init__(self):
self.jobs = [] self.jobs = []
logger = logging.getLogger('looperr') logger = logging.getLogger('looper')
ch = logging.StreamHandler(sys.stdout) ch = logging.StreamHandler(sys.stdout)
ch.setLevel(logging.INFO) ch.setLevel(logging.INFO)
formatter = logging.Formatter('[%(asctime)s] [%(name)s] [%(levelname)s] %(message)s') formatter = logging.Formatter('[%(asctime)s] [%(name)s] [%(levelname)s] %(message)s')