Did I find the right examples for you? yes no

All Samples(9)  |  Call(6)  |  Derive(0)  |  Import(3)

src/s/u/substanced-HEAD/substanced/catalog/indexes.py   substanced(Download)
 
from .discriminators import dummy_discriminator
from .util import oid_from_resource
 
from . import deferred
    def index_resource(self, resource, oid=None, action_mode=None):
        if oid is None:
            oid = oid_from_resource(resource)
        if action_mode is None:
            action_mode = self.action_mode
    def reindex_resource(self, resource, oid=None, action_mode=None):
        if oid is None:
            oid = oid_from_resource(resource)
        if action_mode is None:
            action_mode = self.action_mode
    def unindex_resource(self, resource_or_oid, action_mode=None):
        if isinstance(resource_or_oid, INT_TYPES):
            oid = resource_or_oid
        else:
            oid = oid_from_resource(resource_or_oid)

src/s/u/substanced-HEAD/substanced/catalog/__init__.py   substanced(Download)
    )
 
from .util import oid_from_resource
 
from . import deferred
        with statsd_timer('catalog.index_resource'):
            if oid is None:
                oid = oid_from_resource(resource)
            for index in self.values():
                index.index_resource(resource, oid=oid, action_mode=action_mode)
        """
        if oid is None:
            oid = oid_from_resource(resource)
        with statsd_timer('catalog.reindex_resource'):
            for index in self.values():

src/s/u/substanced-HEAD/substanced/catalog/tests/test_util.py   substanced(Download)
    def _callFUT(self, resource):
        from ..util import oid_from_resource
        return oid_from_resource(resource)
 
    def test_it_resource_is_None(self):