Пример #1
0
    def setUp(self):
        self.client.get('/')
        settings.CLUSTER_SIM_THRESHOLD = 0.1

        args = dict(product=1, version=LATEST_BETAS[FIREFOX], os='mac',
                    locale='en-US')
        for x in xrange(10):
            o = Opinion(description='Skip town. slow down '
                        'Push it to the east coast ' + str(x),
                        **args)
            o.save()

        for x in xrange(10):
            o = Opinion(description='Despite all my rage, '
                        'I am still just a rat in a cage.' + str(x),
                        **args
                       )
            o.save()

        for x in xrange(4):
            o = Opinion(description='It is hammer time baby.  ' + str(x),
                        **args
                       )
            o.save()

        for x in xrange(2):
            o = Opinion(description='Three blind mice.', **args)
            o.save()

        o = Opinion(description='Hello World', **args)
        o.save()

        from themes.cron import cluster
        cluster()
Пример #2
0
    def setUp(self):
        self.client.get('/')
        settings.CLUSTER_SIM_THRESHOLD = 2

        args = dict(product=1, version=FIREFOX.default_version, platform='mac',
                    locale='en-US')
        for x in xrange(10):
            o = Opinion(description='Skip town. slow down '
                        'Push it to the ' + x * 'east coast ',
                        **args)
            o.save()

        for x in xrange(10):
            o = Opinion(description='Despite all my rage, '
                        'I am still just a rat in a ' + x * 'cage ',
                        **args)
            o.save()

        for x in xrange(4):
            o = Opinion(description='It is hammer time ' + x * 'baby ',
                        **args)
            o.save()

        for x in xrange(2):
            o = Opinion(description='Three blind mice.', **args)
            o.save()

        o = Opinion(description='Hello World', **args)
        o.save()

        from themes.cron import cluster
        cluster()
Пример #3
0
    def setUp(self):
        self.client.get('/')
        settings.CLUSTER_SIM_THRESHOLD = 2

        args = dict(product=1,
                    version=FIREFOX.default_version,
                    platform='mac',
                    locale='en-US')
        for x in xrange(10):
            o = Opinion(description='Skip town. slow down '
                        'Push it to the ' + x * 'east coast ',
                        **args)
            o.save()

        for x in xrange(10):
            o = Opinion(description='Despite all my rage, '
                        'I am still just a rat in a ' + x * 'cage ',
                        **args)
            o.save()

        for x in xrange(4):
            o = Opinion(description='It is hammer time ' + x * 'baby ', **args)
            o.save()

        for x in xrange(2):
            o = Opinion(description='Three blind mice.', **args)
            o.save()

        o = Opinion(description='Hello World', **args)
        o.save()

        from themes.cron import cluster
        cluster()
Пример #4
0
    def setUp(self):
        self.client.get("/")
        settings.CLUSTER_SIM_THRESHOLD = 2

        args = dict(product=1, version=LATEST_BETAS[FIREFOX], platform="mac", locale="en-US")
        for x in xrange(10):
            o = Opinion(description="Skip town. slow down " "Push it to the " + x * "east coast ", **args)
            o.save()

        for x in xrange(10):
            o = Opinion(description="Despite all my rage, " "I am still just a rat in a " + x * "cage ", **args)
            o.save()

        for x in xrange(4):
            o = Opinion(description="It is hammer time " + x * "baby ", **args)
            o.save()

        for x in xrange(2):
            o = Opinion(description="Three blind mice.", **args)
            o.save()

        o = Opinion(description="Hello World", **args)
        o.save()

        from themes.cron import cluster

        cluster()
Пример #5
0
def recluster():
    log.info('Clustering!')
    cluster()