Skip to content

Al/new redis graph modeling#125

Draft
adrianLIrobotics wants to merge 39 commits intomainfrom
AL/NewRedisGraphModeling
Draft

Al/new redis graph modeling#125
adrianLIrobotics wants to merge 39 commits intomainfrom
AL/NewRedisGraphModeling

Conversation

@adrianLIrobotics
Copy link
Contributor

No description provided.

adrianLIrobotics and others added 30 commits March 3, 2023 13:24
@Artonus Artonus self-requested a review March 28, 2023 08:16

public override Dto.Dto ToDto()
{
var domain = this;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running action has to store its placement

[RedisIdField]
public override string Id { get; set; } = default!;
[Indexed]
public string ActionParentId { get; init; } = default!; // This is the ID in which the actionRunning us based from the normal Action
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment typo

return new ActionRunningModel()
{
Id = Guid.Parse(dto.Id.Replace(Prefix, "")),
ActionParentId = Guid.Parse(dto.ActionParentId.Replace(Prefix, "")),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have to replace prefixes in these fields

//Add the actionRunning to redis
foreach (ActionModel action in task.ActionSequence)
{
ActionRunningModel actionRunningTemp = new ActionRunningModel();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be extracted into a separate method

/// <inheritdoc/>
public async Task<bool> DeletePlanAsync(ActionPlanModel actionPlan)
{
// Delete OWNS relationship between robot and actionPlan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract to the separate methods

return await ContainerImageGetForInstanceAsync(id, CancellationToken.None);
}

public async Task<bool> ActionRunningAddAsync(ActionRunningModel actionRunning)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functions have to be implemented

return Ok(resourcePlan);

await _redisInterfaceClient.AddRelationAsync(robot2, resourcePlan, "OWNS");
await _redisInterfaceClient.AddRelationAsync(robot2, resourcePlan, "WANTS_TO_RUN");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't a robot still OWN an action plan?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants