Ejemplo n.º 1
0
    def test_completion_config(self):

        from furious.config import get_completion_cleanup_delay
        from furious.config import get_completion_cleanup_queue
        from furious.config import get_completion_default_queue

        expected = 'default'
        queue = get_completion_cleanup_queue()
        self.assertEqual(queue, expected)

        queue = get_completion_default_queue()
        self.assertEqual(queue, expected)

        expected = 7600
        delay = get_completion_cleanup_delay()
        self.assertEqual(delay, expected)
Ejemplo n.º 2
0
    def test_completion_config(self):

        from furious.config import get_completion_cleanup_delay
        from furious.config import get_completion_cleanup_queue
        from furious.config import get_completion_default_queue

        expected = 'default'
        queue = get_completion_cleanup_queue()
        self.assertEqual(queue, expected)

        queue = get_completion_default_queue()
        self.assertEqual(queue, expected)

        expected = 7600
        delay = get_completion_cleanup_delay()
        self.assertEqual(delay, expected)
import json
import logging
import os

from itertools import imap
from itertools import islice
from itertools import izip

from random import shuffle

from google.appengine.ext import ndb

from furious.context.context import ContextResultBase
from furious import config

CLEAN_QUEUE = config.get_completion_cleanup_queue()
DEFAULT_QUEUE = config.get_completion_default_queue()
CLEAN_DELAY = config.get_completion_cleanup_delay()
QUEUE_HEADER = 'HTTP_X_APPENGINE_QUEUENAME'


class FuriousContextNotFoundError(Exception):
    """FuriousContext entity not found in the datastore."""


class FuriousContext(ndb.Model):
    """NDB entity to store a Furious Context as JSON."""

    context = ndb.JsonProperty(indexed=False, compressed=True)

    @classmethod
Ejemplo n.º 4
0
import json
import logging
import os

from itertools import imap
from itertools import islice
from itertools import izip

from random import shuffle

from google.appengine.ext import ndb

from furious.context.context import ContextResultBase
from furious import config

CLEAN_QUEUE = config.get_completion_cleanup_queue()
DEFAULT_QUEUE = config.get_completion_default_queue()
CLEAN_DELAY = config.get_completion_cleanup_delay()
QUEUE_HEADER = 'HTTP_X_APPENGINE_QUEUENAME'


class FuriousContextNotFoundError(Exception):
    """FuriousContext entity not found in the datastore."""


class FuriousContext(ndb.Model):
    """NDB entity to store a Furious Context as JSON."""

    context = ndb.JsonProperty(indexed=False, compressed=True)

    @classmethod