Exemplo n.º 1
0
    def test_valueChain(self):
        from longbot import LongBot
        from push import Push

        LongBot.cacheData()

        cn = LongBot.fetch("daily")
        self.assertTrue(cn > 0)

        if LongBot.fetch("hourly"):
            bots = LongBot.loadBots("0")

            for b in bots:
                res, warn = b.calcDepo()

                for w in warn:
                    Push.send(w)
        else:
            print("Unable to fetch")

        LongBot.closeCache()
Exemplo n.º 2
0
    def test_pushover(self):
        from push import Push

        # Uncomment to send push message, will only send once if cached
        Push.send("Test message 123")
Exemplo n.º 3
0
#!/usr/bin/python
from longbot import LongBot
from push import Push
import sys

if len(sys.argv) > 1:
    print("TEST123" + str(sys.argv))

    cnd = LongBot.fetch("daily")
    cnh = LongBot.fetch("hourly")

    if cnd > 0 and cnh > 0:
        bots = LongBot.loadBots("0")

        for b in bots:
            res, warn = b.calcDepo()
            print(str(res))

            for w in warn:
                print("Issue push " + str(w))
                Push.send(w)
    else:
        print("ERROR\tProblems with fetch")

else:
    print("No timer argument - exit")