You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Major changes:
- Remove reset() method; use delete() + refresh() instead
- Jobs go from any state → (none) via delete, then → pending via refresh()
- Shorten deprecation roadmap: clean break, no legacy support
- Jobs tables created lazily on first populate(reserve_jobs=True)
- Legacy tables with extra PK attributes: jobs table uses only FK-derived keys
Copy file name to clipboardExpand all lines: docs/src/design/autopopulate-2.0-spec.md
+47-37Lines changed: 47 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ class Analysis(dj.Computed):
74
74
"""
75
75
```
76
76
77
-
**Migration note**: Existing tables that violate this constraint will continue to work but cannot use the new jobs system. A deprecation warning will be issued.
77
+
**Legacy table support**: Existing tables that introduce additional primary key attributes (beyond foreign keys) can still use the jobs system, but their jobs table will only include the foreign-key-derived primary key attributes. This means multiple target rows may map to a single job entry. A deprecation warning will be issued for such tables.
78
78
79
79
## Architecture
80
80
@@ -148,16 +148,24 @@ Automatic transitions during `populate()`:
148
148
│
149
149
│ error()
150
150
▼
151
+
┌───────────┐
152
+
│ error │
153
+
└───────────┘
154
+
│
155
+
│ delete
156
+
▼
151
157
┌───────────┐ ┌──────────┐
152
-
│ error │───▶│ pending │
158
+
│ (none) │───▶│ pending │
153
159
└───────────┘ └──────────┘
154
-
reset()
160
+
refresh()
155
161
```
156
162
163
+
**Resetting jobs:** To reset a job (error or otherwise), simply delete it from the jobs table. The next `refresh()` will re-add it as `pending` if the key is still in `key_source`.
164
+
157
165
**Manual status control:**
158
166
-`ignore` is set manually via `jobs.ignore(key)` and is not part of automatic transitions
159
167
- Jobs with `status='ignore'` are skipped by `populate()` and `refresh()`
160
-
-Use `jobs.reset()` to move `ignore` jobs back to `pending`
168
+
-To reset an ignored job, delete it and call `refresh()`
161
169
162
170
## API Design
163
171
@@ -223,19 +231,22 @@ class JobsTable(Table):
223
231
defignore(self, key: dict) -> None:
224
232
"""
225
233
Mark a job to be ignored (skipped during populate).
234
+
235
+
To reset an ignored job, delete it and call refresh().
0 commit comments