-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Collection as a resource in agent and bring on par with latest changes in core library #153
Support Collection as a resource in agent and bring on par with latest changes in core library #153
Conversation
# Building the the collection id, i.e. vocab:Entrypoint/Collection | ||
# TODO build the correct collection id from the resource | ||
# Earlier it used to come as collection/<id> now it comes as class/<id> | ||
redis_collection_id = self.vocabulary + \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xadahiya @chrizandr Earlier when we hit /DroneCollection/<id>
we used to get one instance of Drone and thus we used to update the DroneCollection member in redis. But according to the latest changes in hydrus, /Drone/<id>
returns the instance of the Drone. So how do we know of which collection this class instance will belong to in order to update the redis cache?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drone/<id>
should be used for Drone instances. DroneCollection/<id>
should be used for collection instances. Collections only contain hydra:Links, so you never update a class instance at the collection. You only update at Drone/<id>
to update the drone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still based on the older version of agent without the generalisation of sync mechanism, can you update this?
Also add some sample code somewhere to how we can now use the agent to do operations on collections/create new collections, etc
…nts in redis layer
0a8a4a6
to
f12492e
Compare
Fixes #152
Checklist
Description
This PR enables the agent to adapt to latest changes in core and hydrus.
Change logs