'Removes all jobs from the specified job store, or all job stores if none is given.
:param str|unicode jobstore: alias of the job store'

def remove_all_jobs(self, jobstore=None):

    with self._jobstores_lock:
        if jobstore:
            self._pending_jobs = [pending for pending in self._pending_jobs if (pending[1] != jobstore)]
        else:
            self._pending_jobs = []
        for (alias, store) in six.iteritems(self._jobstores):
            if (jobstore in (None, alias)):
                store.remove_all_jobs()
    self._dispatch_event(SchedulerEvent(EVENT_ALL_JOBS_REMOVED, jobstore))
