Commit 0cef80a
Fix case where last_run_at=None and CELERY_TIMEZONE!=TIME_ZONE (#294)
* Fix case where last_run_at=None, USE_TZ=False, DJANGO_CELERY_BEAT_TZ_AWARE=False, and CELERY_TIMEZONE != settings.TIME_ZONE.
* Make _default_now always return a naive datetime in utc when returning a naive datetime. maybe_make_aware expects naive objects to be in utc time, while make_aware expects localtime. Here, we swap to matching maybe_make_aware's expectations and call it instead. It would be better if the two functions expected the same thing, but I'm not sure how disruptive that change would be. Also, I updated a few gaps in the relevant tests and made them more real. (resetting TZ like django would for one)
* Fix case where last_run_at=None, USE_TZ=False, DJANGO_CELERY_BEAT_TZ_AWARE=False, and CELERY_TIMEZONE != settings.TIME_ZONE.
* Make _default_now always return a naive datetime in utc when returning a naive datetime. maybe_make_aware expects naive objects to be in utc time, while make_aware expects localtime. Here, we swap to matching maybe_make_aware's expectations and call it instead. It would be better if the two functions expected the same thing, but I'm not sure how disruptive that change would be. Also, I updated a few gaps in the relevant tests and made them more real. (resetting TZ like django would for one)
* Fix flake8 errors.
* Fix flake issues in this file too. I only changed these two so hopefully that's it.
* Fix readme.md
I think we are hitting a bug in the markdown processing, where triple backticks are not working properly... I got it to work another way here though, so saving this to make the readme show up properly.
* Fix case where last_run_at=None, USE_TZ=False, DJANGO_CELERY_BEAT_TZ_AWARE=False, and CELERY_TIMEZONE != settings.TIME_ZONE.
* Make _default_now always return a naive datetime in utc when returning a naive datetime. maybe_make_aware expects naive objects to be in utc time, while make_aware expects localtime. Here, we swap to matching maybe_make_aware's expectations and call it instead. It would be better if the two functions expected the same thing, but I'm not sure how disruptive that change would be. Also, I updated a few gaps in the relevant tests and made them more real. (resetting TZ like django would for one)
* Fix flake8 errors.
* Fix flake issues in this file too. I only changed these two so hopefully that's it.1 parent 3b16c5e commit 0cef80a
2 files changed
+56
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
134 | 133 | | |
135 | 134 | | |
136 | 135 | | |
137 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
138 | 141 | | |
139 | 142 | | |
140 | 143 | | |
| |||
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
147 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
148 | 153 | | |
149 | 154 | | |
150 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| 155 | + | |
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
157 | 163 | | |
158 | 164 | | |
159 | 165 | | |
160 | | - | |
| 166 | + | |
161 | 167 | | |
162 | 168 | | |
163 | 169 | | |
| |||
167 | 173 | | |
168 | 174 | | |
169 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
170 | 217 | | |
171 | 218 | | |
172 | 219 | | |
| |||
0 commit comments