Exemplo n.º 1
0
def destalinate_job():
    print("Destalinating")
    if "SB_TOKEN" not in os.environ or "API_TOKEN" not in os.environ:
        print "ERR: Missing at least one Slack environment variable."
    else:
        warner = Warner()
        archiver = Archiver()
        announcer = Announcer()
        flagger = Flagger()
        print("Warning")
        warner.warn()
        print("Archiving")
        archiver.archive()
        print("Announcing")
        announcer.announce()
        print("Flagging")
        flagger.flag()
        print("OK: destalinated")
    print("END: destalinate_job")
Exemplo n.º 2
0
#! /usr/bin/env python

from warner import Warner
from archiver import Archiver

if __name__ == "__main__":
    warner = Warner()
    archiver = Archiver()
    warner.warn()
    archiver.archive()