Did I find the right examples for you? yes no      Crawl my project      Python Jobs

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

src/t/w/TweetHit-HEAD/tweethit/handlers/taskworker.py   TweetHit(Download)
from google.appengine.ext.db import Key
 
from PerformanceEngine import LOCAL,MEMCACHE,DATASTORE, \
NAME_DICT,pdb,time_util
 
 
    product_counters = ProductCounter.get_by_key_name(product_targets.keys(),
                                                      _storage = [MEMCACHE,DATASTORE],
                                                      _result_type=NAME_DICT)
    user_counters = UserCounter.get_by_key_name(user_targets.keys(),
    key_names = [counter.key().name() for counter in product_counters ]
    product_renderers = ProductRenderer.get_by_key_name(key_names,
                                                        _storage=[MEMCACHE,DATASTORE],
                                                        _result_type=NAME_DICT)
    for counter in product_counters:
                                        date)
    if len(renderers):
      pdb.put(renderers, _storage=[MEMCACHE,DATASTORE])
 
 
 
    if renderer is not None: #If all details were fetched successfully
      renderer.put(_storage=[MEMCACHE,DATASTORE])
    else:
      if retries <  MAX_PRODUCT_INFO_RETRIES:

src/t/w/TweetHit-HEAD/tweethit/handlers/cron.py   TweetHit(Download)
from config import SPAM_COUNT_LIMIT
 
from PerformanceEngine import pdb,DATASTORE,MEMCACHE,time_util
from google.appengine.runtime.apiproxy_errors import CapabilityDisabledError
 
      try:
        logging.info('Counters being inserted: %s' %len(counters))
        pdb.put(counters, _storage=DATASTORE)
        #Delete cached counter keys
        CounterBase.set_cached_counter_keys([])
    ban_list = Banlist.retrieve()
    ban_list.products += targets
    ban_list.put(_storage=[MEMCACHE,DATASTORE])     
    pdb.put(products+renderers+product_counters,_storage = [MEMCACHE,DATASTORE])
 
      ban_list = Banlist.retrieve()
      ban_list.users += targets
      ban_list.put(_storage=[MEMCACHE,DATASTORE])
      #TwitterUser.update_banlist([user.key().name() for user in users])
      logging.info('Banning users with keys: %s' %[user.key().name() for user in users])

src/t/w/TweetHit-HEAD/tweethit/model.py   TweetHit(Download)
from PerformanceEngine import pdb,MEMCACHE,DATASTORE
 
from google.appengine.ext import db
from google.appengine.api import memcache
from tweethit.utils.parser_util import AmazonURLParser
class OperationFlags(pdb.Model):
  '''Singleton container class that holds data for synching operation'''
  _key_name = 'OperationFlags'
  _storage = [MEMCACHE,DATASTORE]
 
 
    if kwds.get('_storage'):
      if DATASTORE in kwds.get('_storage'):
        #This should only run once
        products = db.Query(Product, keys_only=True).order("-add_date").fetch(1000)