예제 #1
0
    def path(self, name):
        id = ceil(self.id / 1000.)

        path = dbs('{0:.0f}'.format(ceil((id) / 100.)), '{0:.0f}'.format(id))
        file = os.path.join(path, '{0}_{1}_{2}'.format(self.prefix, self.id, name))

        return ((
            path,
            file
        ))
예제 #2
0
파일: db.py 프로젝트: p0is0n/mail-services
	def __init__(self, name):
		self.name = name
		
		self.next = self.counter(1)
		self.data = self.empty()
		self.file = dbs('{0}.db'.format(self.name))

		self.changesOne = 0
		self.changesAll = 0

		self.lastSyncTime = time()