def stop(self, signum=None, frame=None):
        """
        handel's a termination signal
        """
        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')
handel's a termination signal