예제 #1
0
 def test_time_uuid(self):
     prev = time_uuid.utcnow()
     for i in xrange(1000):
         now = time_uuid.utcnow()
         #print(now.hex)
         self.assertTrue(now > prev)
         prev = now
예제 #2
0
 def test_time_uuid(self):
     prev = time_uuid.utcnow()
     for i in xrange(1000):
         now = time_uuid.utcnow()
         #print(now.hex)
         self.assertTrue(now > prev)
         prev = now
예제 #3
0
 def __init__(self, id=None, title='', text='', auto_start=False):
     if id is None:
         self._id = time_uuid.utcnow().hex
     else:
         self._id = id
     self._title = title
     self._text = text
     self._auto_start = auto_start
예제 #4
0
    def __init__(self, id=None, name=None, started_time=None):
        if id is None:
            self._id = time_uuid.utcnow().hex
        else:
            self._id = id

        self._name = name
        self._started_time = started_time
예제 #5
0
 def __init__(self, id=None, title='', text='', auto_start=False):
     if id is None:
         self._id = time_uuid.utcnow().hex
     else:
         self._id = id
     self._title = title
     self._text = text
     self._auto_start = auto_start
예제 #6
0
    def __init__(self, id=None, name=None, started_time=None):
        if id is None:
            self._id = time_uuid.utcnow().hex
        else:
            self._id = id

        self._name = name
        self._started_time = started_time
예제 #7
0
 def post(self, value):
     key = time_uuid.utcnow().hex
     if self._cursor.put(key, value):
         return key
     return None