@@ -110,8 +110,8 @@ def connect(self, force=False):
110110
111111 def ensure_indexes (self ):
112112
113- self .mongodb_logs .mrq_logs .ensure_index ([("job" , 1 )], background = True )
114- self .mongodb_logs .mrq_logs .ensure_index ([("worker" , 1 )], background = True , sparse = True )
113+ self .mongodb_logs .mrq_logs .ensure_index ([("job" , 1 )], background = False )
114+ self .mongodb_logs .mrq_logs .ensure_index ([("worker" , 1 )], background = False , sparse = True )
115115
116116 if self .config ["mongodb_logs_size" ] > 0 :
117117
@@ -120,14 +120,16 @@ def ensure_indexes(self):
120120 except :
121121 pass
122122
123- self .mongodb_logs .mrq_workers .ensure_index ([("status" , 1 )], background = True )
124- self .mongodb_logs .mrq_workers .ensure_index ([("datereported" , 1 )], background = True , expireAfterSeconds = 3600 )
123+ self .mongodb_logs .mrq_workers .ensure_index ([("status" , 1 )], background = False )
124+ self .mongodb_logs .mrq_workers .ensure_index ([("datereported" , 1 )], background = False , expireAfterSeconds = 3600 )
125125
126- self .mongodb_jobs .mrq_jobs .ensure_index ([("status" , 1 )], background = True )
127- self .mongodb_jobs .mrq_jobs .ensure_index ([("path" , 1 ), ("status" , 1 )], background = True )
128- self .mongodb_jobs .mrq_jobs .ensure_index ([("worker" , 1 ), ("status" , 1 )], background = True , sparse = True )
129- self .mongodb_jobs .mrq_jobs .ensure_index ([("queue" , 1 ), ("status" , 1 )], background = True )
130- self .mongodb_jobs .mrq_jobs .ensure_index ([("dateexpires" , 1 )], sparse = True , background = True , expireAfterSeconds = 0 )
126+ self .mongodb_jobs .mrq_jobs .ensure_index ([("status" , 1 )], background = False )
127+ self .mongodb_jobs .mrq_jobs .ensure_index ([("path" , 1 ), ("status" , 1 )], background = False )
128+ self .mongodb_jobs .mrq_jobs .ensure_index ([("worker" , 1 ), ("status" , 1 )], background = False , sparse = True )
129+ self .mongodb_jobs .mrq_jobs .ensure_index ([("queue" , 1 ), ("status" , 1 )], background = False )
130+ self .mongodb_jobs .mrq_jobs .ensure_index ([("dateexpires" , 1 )], sparse = True , background = False , expireAfterSeconds = 0 )
131+
132+ self .mongodb_jobs .mrq_scheduled_jobs .ensure_index ([("hash" , 1 )], unique = True , background = False , drop_dups = True )
131133
132134 try :
133135 # This will be default in MongoDB 2.6
0 commit comments