예제 #1
0
파일: spinner.py 프로젝트: JoshAshby/psh
    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
예제 #2
0
파일: builder.py 프로젝트: JoshAshby/psh
    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