File tree 3 files changed +8
-5
lines changed
3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 8
8
- Fixed - Updated set_password to work on MySQL 8 - PR [ #1106 ] ( https://github.com/datajoint/datajoint-python/pull/1106 )
9
9
- Added - Missing tests for set_password - PR [ #1106 ] ( https://github.com/datajoint/datajoint-python/pull/1106 )
10
10
- Changed - Returning success count after the .populate() call - PR [ #1050 ] ( https://github.com/datajoint/datajoint-python/pull/1050 )
11
+ - Fixed - ` Autopopulate.populate ` excludes ` reserved ` jobs in addition to ` ignore ` and ` error ` jobs
11
12
12
13
### 0.14.1 -- Jun 02, 2023
13
14
- Fixed - Fix altering a part table that uses the "master" keyword - PR [ #991 ] ( https://github.com/datajoint/datajoint-python/pull/991 )
Original file line number Diff line number Diff line change @@ -207,12 +207,12 @@ def handler(signum, frame):
207
207
208
208
keys = (self ._jobs_to_do (restrictions ) - self .target ).fetch ("KEY" , limit = limit )
209
209
210
- # exclude "error" or "ignore " jobs
210
+ # exclude "error", "ignore" or "reserved " jobs
211
211
if reserve_jobs :
212
212
exclude_key_hashes = (
213
213
jobs
214
214
& {"table_name" : self .target .table_name }
215
- & 'status in ("error", "ignore")'
215
+ & 'status in ("error", "ignore", "reserved" )'
216
216
).fetch ("key_hash" )
217
217
keys = [key for key in keys if key_hash (key ) not in exclude_key_hashes ]
218
218
Original file line number Diff line number Diff line change @@ -75,17 +75,19 @@ def test_populate_exclude_error_and_ignore_jobs(self):
75
75
assert_true (self .subject , "root tables are empty" )
76
76
assert_false (self .experiment , "table already filled?" )
77
77
78
- keys = self .experiment .key_source .fetch ("KEY" , limit = 2 )
78
+ keys = self .experiment .key_source .fetch ("KEY" , limit = 3 )
79
79
for idx , key in enumerate (keys ):
80
80
if idx == 0 :
81
81
schema .schema .jobs .ignore (self .experiment .table_name , key )
82
- else :
82
+ elif idx == 1 :
83
83
schema .schema .jobs .error (self .experiment .table_name , key , "" )
84
+ else :
85
+ schema .schema .jobs .reserve (self .experiment .table_name , key )
84
86
85
87
self .experiment .populate (reserve_jobs = True )
86
88
assert_equal (
87
89
len (self .experiment .key_source & self .experiment ),
88
- len (self .experiment .key_source ) - 2 ,
90
+ len (self .experiment .key_source ) - 3 ,
89
91
)
90
92
91
93
def test_allow_direct_insert (self ):
You can’t perform that action at this time.
0 commit comments