Esempio n. 1
0
	def exist_backoff_timer( self, identifier ):
		count = EnkiModelBackoffTimer.query( EnkiModelBackoffTimer.identifier == identifier ).count( 1 )
		return count > 0
Esempio n. 2
0
	def fetch_old_backoff_timers( self, days_old ):
		list = EnkiModelBackoffTimer.query( EnkiModelBackoffTimer.last_failure <= (datetime.datetime.now( ) - datetime.timedelta( days = days_old )) ).fetch( keys_only = True )
		return list
Esempio n. 3
0
	def remove_backoff_timer( self, identifier ):
		entity = EnkiModelBackoffTimer.query( EnkiModelBackoffTimer.identifier == identifier ).get()
		if entity:
			entity.key.delete()
Esempio n. 4
0
	def get_backofftimer( self, identifier ):
		entity = EnkiModelBackoffTimer.query( EnkiModelBackoffTimer.identifier == identifier ).get()
		return entity
Esempio n. 5
0
 def exist_backoff_timer(self, identifier):
     count = EnkiModelBackoffTimer.query(
         EnkiModelBackoffTimer.identifier == identifier).count(1)
     return count > 0
Esempio n. 6
0
 def fetch_old_backoff_timers(self, days_old):
     list = EnkiModelBackoffTimer.query(
         EnkiModelBackoffTimer.last_failure <= (
             datetime.datetime.now() -
             datetime.timedelta(days=days_old))).fetch(keys_only=True)
     return list
Esempio n. 7
0
 def get_backofftimer(self, identifier):
     entity = EnkiModelBackoffTimer.query(
         EnkiModelBackoffTimer.identifier == identifier).get()
     return entity
Esempio n. 8
0
 def remove_backoff_timer(self, identifier):
     entity = EnkiModelBackoffTimer.query(
         EnkiModelBackoffTimer.identifier == identifier).get()
     if entity:
         entity.key.delete()
Esempio n. 9
0
	def exist_backoff_timer( self, email ):
		count = EnkiModelBackoffTimer.query( EnkiModelBackoffTimer.email == email ).count( 1 )
		if count:
			return True
		else:
			return False
Esempio n. 10
0
	def get_backofftimer( self, email ):
		entity = EnkiModelBackoffTimer.query( EnkiModelBackoffTimer.email == email ).get()
		if entity:
			return entity
		else:
			return None
Esempio n. 11
0
	def remove_backoff_timer( self, email ):
		entity = EnkiModelBackoffTimer.query( EnkiModelBackoffTimer.email == email ).get()
		if entity:
			entity.key.delete()