noc.main.models.reportsubscription

Module Contents

noc.main.models.reportsubscription.logger
class noc.main.models.reportsubscription.ReportSubscription

Bases: mongoengine.document.Document

class RequestStub(user)

Bases: object

meta
file_name
is_active
subject
run_as
notification_group
report
last_status
last_run
PREFIX = var/reports
JCLS = noc.main.models.reportsubscription.ReportJob
classmethod send_reports(cls)

Calculate and send all reports for today :return:

update_status(self, status)
can_run(self)

Check report must be built today :return:

build_report(self)

Generate report :return:

send_report(self, path)
on_save(self)
on_delete(self)
classmethod has_subscriptions(cls)
submit_job(self)
remove_job(self)
class noc.main.models.reportsubscription.ReportJob

Bases: noc.core.scheduler.job.Job

name = daily
HOUR = 1
handler(self, **kwargs)
dereference(self)
schedule_next(self, status)