code: def pre_init_process(self):
          
          db.connections.close_all()
          # update process info
          BackgroundProcess.objects.filter(pk=self.process_id).update(
              pid=self.pid,
              last_update=now(),
              running_since=now(),
              done=False,
              failed=False,
              message='init process..',
          )
  
          [signal.signal(s, signal.SIG_DFL) for s in self.SIGNALS]  # reset
          [signal.signal(s, self.signal) for s in self.SIGNALS]
docs: will be executed after process fork