code: def stop(self, signum=None, frame=None):
          
          BackgroundProcess.objects.filter(pk=self.process_id
                                           ).update(pid=0, last_update=now(), message='stopping..')
          # run the cleanup
          self.cleanup()
          BackgroundProcess.objects.filter(pk=self.process_id).update(pid=0,
                                                                      last_update=now(),
                                                                      message='stopped')
docs: handel's a termination signal