subleq: Even models.ON_DELETE does it in application code, from what I've just seen.
I thought there was a way to get fields to include *something* in the migration SQL, but maybe that's just the db_type.
miz- has quit
gyia joined the channel
zothix has quit
ticketbot has quit
ticketbot joined the channel
dziadekludojadek has quit
LiftLeft2 joined the channel
LiftLeft2 has quit
tbp has quit
tbp joined the channel
Stinger7 has left the channel
darkhanb has quit
aossama has quit
LiftLeft2 joined the channel
maks25 has left the channel
eribol joined the channel
dg_vrani joined the channel
aossama joined the channel
shangxiao has quit
shangxiao joined the channel
natea has quit
natea joined the channel
natea has quit
morenoh149 has quit
natea joined the channel
aljp joined the channel
lavalamp joined the channel
gnu_d has quit
fikka joined the channel
aossama joined the channel
Leeds has quit
fikka has quit
dodobrain_ has quit
kbrown has quit
MarkusH has quit
asadjb has quit
kevin-brown joined the channel
optiz0r joined the channel
subsonik joined the channel
melamo has quit
MarkusH joined the channel
jessamynsmith has quit
asadjb joined the channel
miz- joined the channel
aossama joined the channel
mikeliss: Do you really want to prefetch all of those? That does a seperate query for each model type it needs to get: often a select_related will work on FK relations.
(Although, many of the names indicate they are to-many, in which case they will not work with a select_related)
If you just need an array of tags from the recap documents, for instance, you might be able to get it another way: using a Subquery sometimes works.
aossama has quit
aossama joined the channel
LiftLeft2 has quit
k_sze[work] joined the channel
jef79m has quit
thelinuxguy has quit
contracode has quit
djanos has quit
natim87 has quit
jleclanche has quit
psyolus has quit
kit has quit
romanovic has quit
Derega has quit
romanovic joined the channel
asla joined the channel
djanos joined the channel
jef79m joined the channel
aldnav joined the channel
Guest10590 joined the channel
psyolus joined the channel
LiftLeft2 joined the channel
thelinuxguy joined the channel
tdy has quit
mcspud joined the channel
jessamynsmith joined the channel
Debnet has quit
jgadelange has quit
csotelo joined the channel
jgadelange joined the channel
theWhisper_ joined the channel
tbp has quit
tbp joined the channel
K-ballo has quit
amcorreia has quit
Dunedan joined the channel
novorus has quit
lqez joined the channel
explodes joined the channel
Dunedan__ has quit
mikeliss has quit
csotelo_ joined the channel
csotelo has quit
lavalamp has quit
foul_owl_ joined the channel
fikka joined the channel
-- BotBot disconnected, possible missing messages --
-- BotBot disconnected, possible missing messages --
-- BotBot disconnected, possible missing messages --
[o__o] joined the channel
PoliticsII joined the channel
marlinc joined the channel
tukruic joined the channel
Yen joined the channel
gcain joined the channel
ntnn joined the channel
code1 joined the channel
jaddison joined the channel
amirpro joined the channel
gcain
Where should I put my loop that listens to an RFID scanner? It would be nice if i could start an stop it from the webservice, but I can't work out how to reattach to the MultiProcess object.
Should it maybe just be it's own process?
asla has quit
azulakina joined the channel
bambanx joined the channel
graphene joined the channel
Each request is a single instance right? Once the request has been handled, the instance is killed off. So where would I create the multiprocessing.process so that I can attach to it again?
balr0g joined the channel
Maybe I should write this part in C++. :/
hop
no, usually the workers are kept around, at least for a while
gcain
But would my next request connect to it again so I can pick up the objects created?
hop
no, also that sounds like a bad idea
gcain
I'm coming across from C++ so struggling to wrap my head around the ephemeral nature of reuquests.
hop
http is stateless to begin with ;)
gcain
Yeh, exactly my problem.
confusion.
hop
i'm reminded of the various IoT stacks…
sounds like you should build a daemon that you can talk to stateless as well
gcain
Yeh, I agree.
hop
the prefered way to do background work is a task queue, but maybe you could open a socket at each request?
i don't think it would be necessary to keep these connections open, but if so, you could hack something into django that works like the connection pool for the db
darkhanb joined the channel
eribol has quit
lqez has quit
Xaldafax has quit
fikka joined the channel
jaddison
gcain last I read, django uses thread locals to store shared connection objects. Something similar ought to work. If you created a django app, then in its apps.py AppConfig class, you define a `ready()` method where you could initialize it on django process start