reorganized tasks to subdirs like services

This commit is contained in:
Johannes Findeisen 2013-11-09 04:08:03 +01:00
commit 51f9c2d6d1
12 changed files with 7 additions and 41 deletions

View file

@ -4,7 +4,7 @@
"name": "root",
"tasks": [
{
"class": "mail",
"class": "alert/mail",
"type": "error",
"args": { "host": "localhost",
"port": 25,
@ -15,7 +15,7 @@
}
},
{
"class": "mail",
"class": "alert/mail",
"type": "warning",
"args": { "host": "localhost",
"sender": "linspector@linspector.org",
@ -23,7 +23,7 @@
}
},
{
"class": "mail",
"class": "alert/mail",
"type": "ok",
"args": { "sender": "linspector@linspector.org",
"rcpt": "warning@linspector.org" }
@ -34,7 +34,7 @@
"name": "hannes",
"tasks": [
{
"class": "mail",
"class": "alert/mail",
"type": "ok",
"args": { "rcpt": "warning@linspector.org" }
}

View file

@ -12,7 +12,7 @@
"root":{
"name": "root",
"tasks": [
{ "class":"mail", "type": "error", "args": { "_rcpt": "hanez@linspector.org" }}
{ "class":"alert/mail", "type": "error", "args": { "_rcpt": "hanez@linspector.org" }}
]
}
},

View file

@ -12,7 +12,7 @@
"hanez":{
"name": "admin",
"tasks": [
{ "class":"mail", "type": "error", "args": { "_rcpt": "hanez@linspector.org" }}
{ "class":"alert/mail", "type": "error", "args": { "_rcpt": "hanez@linspector.org" }}
]
}
},

View file

View file

@ -0,0 +1 @@

View file

@ -1,35 +0,0 @@
"""
The syslog task
Copyright (c) 2011-2013 by Johannes Findeisen and Rafael Timmerberg
This file is part of Linspector (http://linspector.org).
Linspector is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
from logging import getLogger
from linspector.tasks.task import Task
logger = getLogger(__name__)
class SyslogTask(Task):
def __init__(self, **kwargs):
pass
def create(kwargs):
return SyslogTask(**kwargs)