Beispiel #1
0
    def push_error(self, e):
        logger.error(e)

        c.redis.rpush("spin:errors", str(e))
        if c.redis.llen("spin:errors") > 500:
            c.redis.lpop("spin:errors")

        try:
            ps.pushover(message="Error with containter {id}. {error}"\
                .format(id=self.container.id[:11], error=str(e)),
                        title="Failed to stop container")
        except:
            pass
Beispiel #2
0
    def failed_build(self, image_model, e):
        self.image.add_image("failed", log=str(e))

        logger.error(e)

        c.redis.rpush("build:errors", str(e))
        if c.redis.llen("build:errors") > 500:
            c.redis.lpop("build:errors")

        try:
            ps.pushover(message="Building of image {id} failed."\
                .format(id=self.image.id[:11]),
                        title="Failed image build")
        except:
            pass