Skip to content

Commit 7a258d4

Browse files
author
Thinh Nguyen
committed
Merge remote-tracking branch 'upstream/master' into populate_success_count
2 parents 37801d6 + e339d46 commit 7a258d4

File tree

105 files changed

+1139
-2630
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+1139
-2630
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
### 0.14.0 -- TBA
44
* Bugfix - Activating a schema requires all tables to exist even if `create_tables=False` PR [#1058](https://github.com/datajoint/datajoint-python/pull/1058)
5+
* Update - Populate call with `reserve_jobs=True` to exclude `error` and `ignore` keys - PR [#1062](https://github.com/datajoint/datajoint-python/pull/1062)
56

67
### 0.13.8 -- Sep 21, 2022
78
* Add - New documentation structure based on markdown PR [#1052](https://github.com/datajoint/datajoint-python/pull/1052)

datajoint/autopopulate.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import random
66
import inspect
77
from tqdm import tqdm
8+
from .hash import key_hash
89
from .expression import QueryExpression, AndList
910
from .errors import DataJointError, LostConnectionError
1011
import signal
@@ -205,6 +206,16 @@ def handler(signum, frame):
205206
old_handler = signal.signal(signal.SIGTERM, handler)
206207

207208
keys = (self._jobs_to_do(restrictions) - self.target).fetch("KEY", limit=limit)
209+
210+
# exclude "error" or "ignore" jobs
211+
if reserve_jobs:
212+
exclude_key_hashes = (
213+
jobs
214+
& {"table_name": self.target.table_name}
215+
& 'status in ("error", "ignore")'
216+
).fetch("key_hash")
217+
keys = [key for key in keys if key_hash(key) not in exclude_key_hashes]
218+
208219
if order == "reverse":
209220
keys.reverse()
210221
elif order == "random":

docs-parts/admin/5-blob-config_lang1.rst

Lines changed: 0 additions & 17 deletions
This file was deleted.

docs-parts/admin/5-blob-config_lang2.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs-parts/admin/5-blob-config_lang3.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs-parts/admin/5-blob-config_lang4.rst

Lines changed: 0 additions & 29 deletions
This file was deleted.

docs-parts/computation/01-autopopulate_lang1.rst

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs-parts/computation/01-autopopulate_lang2.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs-parts/computation/01-autopopulate_lang3.rst

Lines changed: 0 additions & 23 deletions
This file was deleted.

docs-parts/computation/01-autopopulate_lang4.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)