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

Add a taskmanager to manage start stop order of processes #576

Closed
wants to merge 8 commits into from

Conversation

andymck
Copy link
Contributor

@andymck andymck commented Jul 20, 2023

This takes bbalser's original work on the taskmanager, updates it and extends it to all oracles.

The intent to to implement a controlled start / stop order for tasks/processes.

Some considerations I still need to circle back / conclude on:

  • The gateway and region caches, prior to this change, were passed by reference to the run function of a process ( for example the runner in the iot verifier ). With the changes here that is no longer possible as the taskman API changes the run API to only take the shutdown listener and moves any previous params into the struct. To accommodate this caches are now cloned into the struct and then derived from there. The caches at this point are watch receivers...I am still unsure whether these clones are pointers to the underlying value ( in this case a retainer cache ) or it its cloning the actual retainer cache.
  • In the iot config I removed some internal shutdown listener handler ( such as in the gateway_service and the route_service ). Maybe there was good reason they were there ? If so I will need to rejig a few things to get the shutdown listener available to those services
  • the pricer's price_tracker task does not yet implement the new taskman api. It has an unusual startup pattern which I will need to discuss with brian as to the original intent

task_manager/src/lib.rs Outdated Show resolved Hide resolved
@andymck andymck force-pushed the andymck/bbalser/task-manager-4 branch 2 times, most recently from b78f22c to 669f6af Compare August 7, 2023 11:47
@andymck andymck force-pushed the andymck/bbalser/task-manager-4 branch from 669f6af to 043e200 Compare August 18, 2023 13:15
@maplant maplant changed the title add a taskmanager to manage start stop order of processes Add a taskmanager to manage start stop order of processes Aug 18, 2023
@andymck
Copy link
Contributor Author

andymck commented Aug 21, 2023

superseded by #606

@andymck andymck closed this Aug 21, 2023
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