that should work, I'm not spending a lot of time on issues for this since flower is a much better solution
btw, adding new information to exceptions is hard in py 2 :(
jezdez
that didn't do the trick
asksol
then I guess we have to find out what field it is
either there's an unexpected date field, or maybe_make_aware did not return an aware datetime
you can wrap the exception in a new exception but then you lose the stack, or you can re-raise the exception with a new value, but then the exception class may not support the first argument being a string. So adding the task_id can only safely be added to the exception in Python 3 (which keeps a list of stack traces instead of just one)
try adding if defaults['eta']: assert defaults['eta'].tzinfo
same with expires and tstamp
or just add a assert value.tzinfo around maybe_make_aware itself
yeah, there are additional datetime fields for this model
no additional
jezdez
I don't get it, when I run celerycam outside of supervisor it works
but within it doesn't
argh
asksol
so it only happens as a daemon?
jezdez
I just run celerycam
supervisor handles the rest
at least it should
seriously wtf.
asksol
daemonization can cause a lot of side effects though
please find out if maybe_make_aware actually sets the tzinfo
andrewwatts has quit
django does set up some locale and default timezone and things still, right?
that could be affected by daemonization maybe
hey, the make_aware implementation, it only does something if USE_TZ is False?
no, is true
jezdez
ok, here's some new information
we started to schedule tasks with apply_sync's countdown parameter
andrewwatts joined the channel
with exactly 7 days
it uses that 7 days in seconds to calculate the eta
I think when getting the self.app.now() from django-celery it returns a naive datetime
technically I think the datatime is aware (with UTC timezone) when sent in the event, but it's converted to iso8601 format first, and I don't think the timezone is reconstructed on the other side. But still, maybe_make_aware should set the tzinfo, it could be the wrong timezone but the value returned from maybe_make_aware shouldn't be naive
(that is unless USE_TZ=False)
make_aware does nothing if USE_TZ=False
I think you wrote that function
but if USE_TZ=False I guess the model wouldn't complain about naive datetimes either
timezones must be like the hardest computer problem ever :)
fernandogrd has quit
so to debug this we need to make sure that maybe_make_aware sets the .tzinfo
jezdez
settings.USE_TZ is True
ok
asksol
mher: do you have any plans adding persistence support to Flower?
it could just dump the state to a shelve or something at exit
and possibly sync every n minutes
fernandogrd joined the channel
racycle joined the channel
redir_ joined the channel
jdunck joined the channel
celhead joined the channel
jezdez
asksol: I moved the definition of eta and expires out of the dictionary declaration and it works
maybe I'm just going crazy
asksol
in that case it's probably a problem with maybe_make_aware