def write_shared_area(self): payload = json.dumps(self.data) # write payload len sharedarea_write32(self.id, 0, len(payload)) # write payload sharedarea_write(self.id, 4, payload)
def test_32(self): pos = 2L * (1024L ** 3) uwsgi.sharedarea_write32(0, pos, 17) self.assertEqual(uwsgi.sharedarea_read32(0, pos), 17)
def test_32(self): uwsgi.sharedarea_write32(0, 0, 17) self.assertEqual(uwsgi.sharedarea_read32(0, 0), 17)
def test_dec32(self): uwsgi.sharedarea_write32(0, 5, 30) uwsgi.sharedarea_dec32(0, 5, 4) self.assertEqual(uwsgi.sharedarea_read32(0, 5), 26)
def test_inc32(self): uwsgi.sharedarea_write32(0, 4, 30) uwsgi.sharedarea_inc32(0, 4, 3) self.assertEqual(uwsgi.sharedarea_read32(0, 4), 33)
def test_32(self): pos = 2L * (1024L**3) uwsgi.sharedarea_write32(0, pos, 17) self.assertEqual(uwsgi.sharedarea_read32(0, pos), 17)
def clear(self): # write zero len sharedarea_write32(self.id, 0, 0)