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

plugin: main loop extensions #3485

Closed
oliver-sanders opened this issue Jan 27, 2020 · 0 comments · Fixed by #3492
Closed

plugin: main loop extensions #3485

oliver-sanders opened this issue Jan 27, 2020 · 0 comments · Fixed by #3492
Milestone

Comments

@oliver-sanders
Copy link
Member

oliver-sanders commented Jan 27, 2020

Open up an interface to add functionality to the main loop.

A plugin would define:

  • Some function to run before the main loop.
  • Some function to run at the end of the main loop at a minimum interval of X.
  • Some function to run at the end of the main loop (unless errored)?

This would help us to develop on-board analytics and would play very nicely with the next profile-battery (when/if we ever get around to that!).

At present we have on-board profiling (the cylc profiling stuff, uses cprofile), that could be easily implemented via this interface.

The trigger to this idea was the way we patched the scheduler object to identify this memory leak:

master

I've written many cylc.flow.scheduler patches like this at some point or another. Would be nice if we could save those patches so we could perform that analysis again on another branch at a later date. Would also provide us with the ability to back-port profiling to earlier versions of Cylc.

The plugin would be given an interface along the likes of:

  • before(Scheduler: sch) -> data: dict
  • during(Scheduler: sch, data: dict)
  • after(data: dict)

Pull requests welcome!

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 a pull request may close this issue.

2 participants