1

I read about signals in the follow link but it doesn't quite answer in the scenario of using signals in app engine:

Where should signal handlers live in a django project?

For years now my signals are being connected in the bottom of my application file, but I came across a scenario where an App Engine instance started to handle deferred class and it didn't connected my signals handler so no handler was handling the sent signals in the deferred tasks in that instance (maybe the instance memory was cleaned up).

So my question is where it will be the safest place to connect my signals? A place where I can be 100% sure all the handlers will be connected.

My best guess would be the bottom of the module which sends the signal, but is it really the best place? or can it cause lots of import overhead?

adi ohaion
  • 374
  • 6
  • 21

0 Answers0