def check_agent_router_scheduling_needed(self, context, agent, router):
        router_id = router['id']
        agent_id = agent['id']
        query = context.session.query(RouterL3AgentBinding)
        bindings = query.filter_by(router_id=router_id).all()
        if not bindings:
            return True
        for binding in bindings:
            if binding.l3_agent_id == agent_id:
                # router already bound to the agent we need
                return False
        if router.get('ha'):
            return True
        # legacy router case: router is already bound to some agent
        raise l3agentscheduler.RouterHostedByL3Agent(
            router_id=router_id,
            agent_id=bindings[0].l3_agent_id)
Return human-readable absolute time string.
dataset/ETHPy150Open openstack/neutron/neutron/db/l3_agentschedulers_db.py/L3AgentSchedulerDbMixin.check_agent_router_scheduling_needed--crossover with--dataset/ETHPy150Open buckket/twtxt/twtxt/models.py/Tweet.absolute_datetime