Skip to content
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

Rework internal 'once' commands #625

Closed
4 tasks done
mpeck opened this issue May 4, 2016 · 1 comment
Closed
4 tasks done

Rework internal 'once' commands #625

mpeck opened this issue May 4, 2016 · 1 comment
Assignees
Milestone

Comments

@mpeck
Copy link
Contributor

mpeck commented May 4, 2016

All commands will become multi commands. That is, they will be run once for each result from the previous stage of the pipeline. Commands will depend on the new memory service to accumulate any state.

Commands to be reworked:

  • table
  • sort
  • unique
  • sleep

parent #399
depends on:

@mpeck mpeck added this to the Cog 0.6.0 milestone May 4, 2016
@vanstee
Copy link
Member

vanstee commented May 5, 2016

Now that we have COG_STAGE_POS, COG_SERVICE_TOKEN and COG_INVOCATION_ID we can accumulate state in a unique id for each new item using the memory service, and then on the last item we can retrieve the state, perform an operation on it and return it. I'll start with sort since we've already put together a similar example written in ruby https://gist.github.com/vanstee/a4b1372d3acc35d565c3d82be0f77615 Although, just to be clear, we'll still be writing these in Elixir with GenCommand for now.

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

No branches or pull requests

2 participants