0:07 AM
malinoff joined the channel
0:13 AM
italorossi joined the channel
0:26 AM
__Yiota has quit
0:37 AM
__Yiota joined the channel
1:06 AM
__Yiota has quit
1:07 AM
__Yiota joined the channel
1:26 AM
czart_ joined the channel
1:30 AM
czart has quit
1:39 AM
malinoff has quit
1:44 AM
the_rat joined the channel
1:44 AM
italorossi has quit
1:48 AM
the_rat has quit
1:52 AM
maks25 joined the channel
1:58 AM
c1b0rg joined the channel
1:59 AM
c1b0rg
hello. do you have any implementation of celery workers in a coreos cluster. I'm kinda confused on this one. Kindly please enlighten me.
2:22 AM
ttrex joined the channel
2:23 AM
ttrex
hey guys
2:23 AM
I'm having some problems getting my Flask app's context when using task signals
2:24 AM
I made a SO post but it's not gaining much traction
2:24 AM
2:25 AM
basically, it doesn't look like you can get your app context when you're in a @task_prerun ?
2:25 AM
what I'm trying to do is insert a record into a database before my task runs, using the database handler from my app
2:25 AM
what I'm trying to do is insert a record into a database before my task runs, using the database handler from my flask app
2:27 AM
malinoff joined the channel
2:31 AM
I've got to head out for a bit, but if anyone has the slightest clue on how I can solve this without re-init. the DB handler in the signal handler, please leave a comment on the SO post if you can :)
2:47 AM
malinoff
ttrex: what's the link to your SO post?
2:48 AM
ttrex
over here :)
2:48 AM
2:55 AM
malinoff
ttrex: and your celery version is?
2:56 AM
ttrex
4.1.0
3:04 AM
malinoff
ttrex: okay, signals aren't tasks and they won't call your ContextTask.__call__ method
3:05 AM
ttrex: in fact, the error you're getting on "with celery.app.context():" is that celery doesn't know anything about your flask "app"
3:05 AM
that line should really be the same as the one in ContextTask.__call__
3:05 AM
ttrex
that makes sense and it's pretty much what I deduced
3:05 AM
what would be the recommended approach if I wanted to log something in the same db?
3:06 AM
can I get the context from the task?
3:06 AM
comingsoontm_ has quit
3:08 AM
looks like it
3:08 AM
or not actually
3:08 AM
malinoff
you're keep mixing celery and flask
3:09 AM
these are completely separated things
3:09 AM
celery doesn't know anything about flask unless you store the flask's app somewhere in the celery by yourself
3:09 AM
therefore "to get the context from the task" doesn't make sense
3:10 AM
you have your flask app available globally, you should simply import and use it
3:12 AM
ttrex
I don't even need to import it, its in the same file
3:13 AM
but I'm still getting `working outside of application context`
3:13 AM
malinoff
what's your updated code?
3:14 AM
ttrex
my bad, I actually got it
3:14 AM
awesome thanks
3:15 AM
yes I seem to have gotten confused, partly from finding old examples meant for previous versions of celery and flask
3:15 AM
many thanks for your help @malinoff
3:15 AM
malinoff
welcome
3:28 AM
maks25 has quit
3:35 AM
c1b0rg has quit
3:43 AM
maks25 joined the channel
3:45 AM
the_rat joined the channel
3:48 AM
ttrex has quit
3:49 AM
the_rat has quit
4:06 AM
maks25 has quit
4:06 AM
maks25 joined the channel
4:06 AM
maks25 has quit
4:07 AM
maks25 joined the channel
4:07 AM
maks25 has quit
4:08 AM
maks25 joined the channel
4:08 AM
maks25 has quit
4:09 AM
maks25 joined the channel
4:09 AM
maks25 has quit
4:09 AM
maks25 joined the channel
4:10 AM
maks25 has quit
4:43 AM
__Yiota has quit
4:46 AM
atomekk joined the channel
4:46 AM
atomekk joined the channel
5:03 AM
cajbecu has quit
5:11 AM
eN_Satwik_Kolhe_ joined the channel
5:26 AM
__Yiota joined the channel
5:45 AM
the_rat joined the channel
5:50 AM
the_rat has quit
5:55 AM
__Yiota has quit
6:08 AM
cajbecu joined the channel
6:22 AM
Tawonga joined the channel
6:35 AM
mihaj joined the channel
6:40 AM
subho has quit
6:47 AM
nsmfoo joined the channel
7:00 AM
subho joined the channel
7:10 AM
atomekk joined the channel
7:10 AM
atomekk has quit
7:10 AM
atomekk joined the channel
7:26 AM
__Yiota joined the channel
7:31 AM
__Yiota has quit
7:41 AM
subho has quit
7:46 AM
the_rat joined the channel
7:51 AM
the_rat has quit
7:56 AM
mihaj has quit
7:58 AM
mihaj joined the channel
8:12 AM
subho joined the channel
8:50 AM
atomekk has quit
8:50 AM
clokep joined the channel
8:54 AM
clokep has quit
8:54 AM
ams__ joined the channel
8:57 AM
eshlox joined the channel
9:27 AM
mihaj has quit
9:36 AM
subho has quit
9:38 AM
subho joined the channel
9:42 AM
the_rat joined the channel
9:47 AM
the_rat_ joined the channel
9:51 AM
the_rat_ has quit
9:52 AM
mihaj joined the channel
10:17 AM
malinoff has quit
10:29 AM
clokep joined the channel
10:33 AM
clokep has quit
10:36 AM
malinoff joined the channel
10:38 AM
malinoff has quit
10:38 AM
malinoff joined the channel
10:43 AM
malinoff has quit
10:46 AM
Ergo joined the channel
11:28 AM
seanBE joined the channel
11:36 AM
clokep joined the channel
11:45 AM
malinoff joined the channel
11:48 AM
the_rat_ joined the channel
11:52 AM
the_rat_ has quit
11:52 AM
italorossi joined the channel
11:57 AM
italorossi has quit
11:57 AM
mihaj has quit
11:59 AM
F2 has quit
12:09 PM
Diemuzi joined the channel
12:11 PM
KeyJoo joined the channel
12:27 PM
mihaj joined the channel
12:33 PM
nsmfoo has quit
12:34 PM
wandering_vagran joined the channel
12:38 PM
AndyBrown has quit
12:42 PM
dalley joined the channel
12:43 PM
dasd_ joined the channel
12:43 PM
dasd_ has quit
12:49 PM
italorossi joined the channel
13:13 PM
clokep has quit
13:16 PM
clokep joined the channel
13:19 PM
wandering_vagran has quit
13:23 PM
drake01 joined the channel
13:31 PM
wandering_vagran joined the channel
13:34 PM
April- joined the channel
13:38 PM
subho has quit
13:41 PM
subho joined the channel
13:47 PM
__Yiota joined the channel
13:49 PM
the_rat_ joined the channel
13:49 PM
wandering_vagran has quit
13:52 PM
subho has quit
13:53 PM
the_rat_ has quit
13:58 PM
subho joined the channel
14:03 PM
wandering_vagran joined the channel
14:15 PM
lavalamp joined the channel