@classmethod
    def send_instance_state_update(cls, state='ACTIVE'):
        """
        Sends a status update to feederd through SimpleDB. Lets the daemon
        know how many jobs this instance is crunching right now. Also updates
        a timestamp field to let feederd know how long it has been since the
        instance's last check-in.
        
        :keyword str state: If this EC2_ instance is anything but ``ACTIVE``,
            pass the state here. This is useful during node termination.
        """
        if cls.is_ec2_instance():
            instance_id = cls.get_instance_id()
            item = cls._aws_sdb_nommer_state_domain().new_item(instance_id)
            item['id'] = instance_id
            item['active_jobs'] = cls.get_num_active_threads() - 1
            item['last_report_dtime'] = datetime.datetime.now()
            item['state'] = state
            item.save()
dataset/ETHPy150Open duointeractive/media-nommer/media_nommer/ec2nommerd/node_state.py/NodeStateManager.send_instance_state_update/original