Ejemplo n.º 1
0
    def gzip_errors_online_cache(self, error_message):
        ''' products on cache are corrupted '''
        keys = ['gzip: stdin: invalid compressed data--format violated']
        status = 'retry'
        reason = 'Input gzip corrupt'
        extras = self.__add_retry('gzip_errors')

        resolution = self.__find_error(error_message, keys, status, reason,
                                       extras)
        is_landsat = False
        if self.product_name is not None:
            is_landsat = isinstance(sensor.instance(self.product_name),
                                    sensor.Landsat)

        if resolution is not None and is_landsat:
            logger.debug("err api/errors.py gzip_errors_online_cache\n"\
                        "product_name: {0}\nerror_message: {1}".format(self.product_name, error_message))
            emails.Emails().send_gzip_error_email(self.product_name)

        return resolution
Ejemplo n.º 2
0
 def test_production_send_initial_emails(self):
     order = Order.find(self.mock_order.generate_testing_order(self.user_id))
     order.update('status', 'ordered')
     self.assertTrue(emails.Emails().send_all_initial())