Revision 26dff0ef snf-pithos-backend/pithos/workers/glue.py

b/snf-pithos-backend/pithos/workers/glue.py
49 49

  
50 50
    @classmethod
51 51
    def setupXsegPool(cls, ObjectPool, Segment, Xseg_ctx, cfile, pool_size=8):
52
	if WorkerGlue.worker_id == None:
53
		return
54 52
        worker_id = WorkerGlue.worker_id
55 53
        ARCHIPELAGO_CONF_FILE = cfile
56 54
        ARCHIPELAGO_SEGMENT_TYPE = 'segdev'
......
82 80
                    ioctx = Xseg_ctx(self.segment, self.worker_id + self.cnt)
83 81
                    self.cnt += 1
84 82
                    return ioctx
85
                else:
83
                elif self.worker_id > 1:
86 84
                    ioctx = Xseg_ctx(self.segment,
87 85
                                     (self.worker_id - 1) * pool_size + 2 +
88 86
                                     self.cnt)
89 87
                    self.cnt += 1
90 88
                    return ioctx
89
		elif self.worker_id == None:
90
                    ioctx = Xseg_ctx(self.segment, 200)
91
                    return ioctx
91 92

  
92 93
            def _pool_verify(self, poolobj):
93 94
                return True

Also available in: Unified diff