With the server attribute job_history_enable = True, a job in the state M is purged after the job is really finished.
There are two conditions that need to be met in order to purge the job in the state M:
The job in state M is still not stored with job_history_enable = False.