taskmeta is for results (if you use the django orm backend)
dhackner
right, which i'm grabbing
but I dont think it contains the task data
ionelmc
why not use asyncresult then?
you mean task arguments or the result?
dhackner
i'm processing a model in a task
so i want to attach the associated state and result to the model
ionelmc
you could just wrap the processing code yourself
dhackner
either way, to attach to the model is either a task_id or a taskmeta entry right?
then just lookup the asyncresult based on the task_id
ionelmc
ok, so you want the task id?
dhackner
ideally i would directly attach the taskmeta entry
the task id is easy
but requires another lookup down the road.
ionelmc
i see
why do you want to attach the taskmeta ? you only need to save the taskid and status
dhackner
taskmeta tracks the status
ionelmc
the backend would do cleaning that would not work if you have foreignkeys pointing to result objects
dhackner
the goal
ionelmc
i imagine you want task result expiration no?
dhackner
that is handled elsewhere
the point of attaching the taskmeta
sam_stav joined the channel
sam_stav has quit
is that it was a clean way to look at the model along with its status
guhcampos has quit
but its ok to just attach an id and do a asyncresult lookup
ionelmc
that object would be created after the task is done iirc
the taskmeta
dhackner
yea i think you are right
ionelmc
you could just subclass the backend
dhackner
i was HOPING it was created as a placeholder first
upon producing the task
thus my initial question
but I think I have a solution, no worries :-)
ionelmc
i think custom result backend would be a better solution
but if you want to attach something that indicates progress then taskmeta is not what you want
taskstate is
and for that you need to enable monitoring
dhackner
no progress to track here
just successful, pending, failed
think an outbox kind of
i dont see why a custom result backend would be necessary for tracking ids and states
zircote has quit
brb
Ergo has quit
proteneer has quit
dhackner has quit
dhackner joined the channel
dhackner has quit
dhackner joined the channel
ionelmc has quit
luke_ftw_ joined the channel
jeffasinger joined the channel
bkuberek joined the channel
bwreilly has quit
bkuberek has quit
gremmie has quit
k_sze[work] joined the channel
jeffasinger has quit
dhackner has quit
bkuberek joined the channel
rickmak joined the channel
bkuberek has quit
techdragon joined the channel
Newbie0086 joined the channel
patrickod is now known as zz_patrickod
bkuberek joined the channel
sgviking joined the channel
bkuberek has quit
fernandogrd joined the channel
luke_ftw_ has quit
bkuberek joined the channel
fernandogrd has quit
sam_stav joined the channel
kuhnza_ has quit
fayaz joined the channel
anuvrat joined the channel
sam_stav has quit
domino14 has quit
bkuberek has quit
bkuberek joined the channel
domino14 joined the channel
Frosh joined the channel
bkuberek has quit
bkuberek joined the channel
bkuberek has quit
kuhnza joined the channel
sam_stav joined the channel
kuhnza has quit
sam_stav has quit
atomekk joined the channel
bkuberek joined the channel
bkuberek has quit
pilt joined the channel
Cromulent joined the channel
Cromulent has quit
pilt has quit
yopiti joined the channel
ledil joined the channel
ledil
hello, Im using celery for my django project, Ive used everytime "from celery.decorators import task" now it is not possible anymore what happens ?
and as I understand it right, I dont django-celeryd anymore ?
pilt joined the channel
yanliang joined the channel
rons joined the channel
rons
Hi. I am having an hard time figuring out how to connect between my application to the worker is running on another terminal session
It looks like my application doesn't know about the celery configuration, I can't find some docs about that online... any ideas ?
Flonka
ledil: Do you want to import the Task class?
rons: You could duplicate the config, make sure to use the same config?
ledil
Flonka: I want just register a celery task
rons
Flonka:where should I duplicate to? the configuration now is inside the proj/celeryconfig.py. and the connection is inside proj/celery, this is right ?
yanliang is now known as brad_qqq
daniel_hozac
rons: just import your tasks and apply them.
rons: from proj.tasks import your_task; your_task.apply_async((args...))