|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## Version 0.17.0 |
| 4 | + |
| 5 | +### ⚠️ Breaking changes |
| 6 | + |
| 7 | +#### Allow truncating task executions ([251](https://github.com/closeio/tasktiger/pull/251)) |
| 8 | + |
| 9 | +##### Overview |
| 10 | + |
| 11 | +This version of TaskTiger switches to using the `t:task:<id>:executions_count` Redis key to determine the total number of task executions. In previous versions this was accomplished by obtaining the length of `t:task:<id>:executions`. This change was required for the introduction of a parameter to enable the truncation of task execution entries. This is useful for tasks with many retries, where execution entries consume a lot of memory. |
| 12 | + |
| 13 | +This behavior is incompatible with the previous mechanism and requires a migration to populate the task execution counters. |
| 14 | +Without the migration, the execution counters will behave as though they were reset, which may result in existing tasks retrying more times than they should. |
| 15 | + |
| 16 | +##### Migration |
| 17 | + |
| 18 | +The migration can be executed fully live without concern for data integrity. |
| 19 | + |
| 20 | +1. Upgrade TaskTiger to `0.16.2` if running a version lower than that. |
| 21 | +2. Call `tasktiger.migrations.migrate_executions_count` with your `TaskTiger` instance, e.g.: |
| 22 | +```py |
| 23 | +from tasktiger import TaskTiger |
| 24 | +from tasktiger.migrations import migrate_executions_count |
| 25 | + |
| 26 | +# Instantiate directly or import from your application module |
| 27 | +tiger = TaskTiger(...) |
| 28 | + |
| 29 | +# This could take a while depending on the |
| 30 | +# number of failed/retrying tasks you have |
| 31 | +migrate_executions_count(tiger) |
| 32 | +``` |
| 33 | +3. Upgrade TaskTiger to `0.17.0`. Done! |
| 34 | + |
| 35 | +#### Import cleanup ([258](https://github.com/closeio/tasktiger/pull/258)) |
| 36 | + |
| 37 | +Due to a cleanup of imports, some internal TaskTiger objects can no longer be imported from the public modules. This shouldn't cause problems for most users, but it's a good idea to double check that all imports from the TaskTiger package continue to function correctly in your application. |
| 38 | + |
3 | 39 | ## Version 0.16.2 |
4 | 40 |
|
5 | 41 | ### Other changes |
|
38 | 74 |
|
39 | 75 | ## Version 0.13 |
40 | 76 |
|
41 | | -### Breaking changes |
| 77 | +### ⚠️ Breaking changes |
42 | 78 |
|
43 | 79 | #### Changing the locking mechanism |
44 | 80 |
|
@@ -84,7 +120,7 @@ Plus, there is: |
84 | 120 |
|
85 | 121 | ## Version 0.12 |
86 | 122 |
|
87 | | -### Breaking changes |
| 123 | +### ⚠️ Breaking changes |
88 | 124 |
|
89 | 125 | * Drop support for redis-py 2 ([#183](https://github.com/closeio/tasktiger/pull/183)) |
90 | 126 |
|
|
0 commit comments