@web.authenticated
    @gen.coroutine
    def get(self):
        refresh = self.get_argument('refresh', default=False, type=bool)
        status = self.get_argument('status', default=False, type=bool)
        workername = self.get_argument('workername', default=None)

        if status:
            info = {}
            for name, worker in self.application.events.state.workers.items():
                info[name] = worker.alive
            self.write(info)
            return

        if self.worker_cache and not refresh and\
                workername in self.worker_cache:
            self.write({workername: self.worker_cache[workername]})
            return

        if refresh:
            try:
                yield self.update_cache(workername=workername)
            except Exception as e:
                msg = "Failed to update workers: %s" % e
                logger.error(msg)
                raise web.HTTPError(503, msg)

        if workername and not self.is_worker(workername):
            raise web.HTTPError(404, "Unknown worker '%s'" % workername)

        if workername:
            self.write({workername: self.worker_cache[workername]})
        else:
            self.write(self.worker_cache)
Test the behavior of --outdated flag in the list command
dataset/ETHPy150Open mher/flower/flower/api/workers.py/ListWorkers.get--crossover with--dataset/ETHPy150Open pypa/pip/tests/functional/test_list.py/test_outdated_flag