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

wip: addressing issue #56, allowing for us to determine how often we caput #64

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

joshc-slac
Copy link
Collaborator

Description

This is likely not the best way to do this but I want to motivate a few things:

  • chopping up tree_config.py into logical units
  • adding derived base class support to our serialization schema
  • ask if this type of feature should be implemented at this layer, or hidden from super users within the wrapped_action_work helper
  • ask if it is not better to just change the loop frequency...
  • we could also use BT style decorators... but this would still make us add a mechanism that routed tick timing to work function (via Semaphore most likely)

Motivation and Context

We don't necessarily want to spam EPICS with caput requests. This is a mechanism to do that

How Has This Been Tested?

Extended test cases to exercise this feature

Where Has This Been Documented?

Probably needs a little something

##Alternatives:
Instantiating a semaphore in ActionNode that is passed to ActionWorker to be wrapped and then using the semaphore to pass ticks which gate execution of the work function might be cleaner.

Pre-merge checklist

  • Code works interactively
  • Code follows the style guide
  • Code contains descriptive docstrings, including context and API
  • New/changed functions and methods are covered in the test suite where possible
  • Test suite passes locally
  • Test suite passes on GitHub Actions
  • Ran docs/pre-release-notes.sh and created a pre-release documentation page
  • Pre-release docs include context, functional descriptions, and contributors as appropriate

@joshc-slac joshc-slac force-pushed the joshc-slac/timeout-action-node branch from d49a5ee to 8df553d Compare October 19, 2024 03:12
@joshc-slac joshc-slac force-pushed the joshc-slac/selective-caput-paradigm branch from 8163b9c to bd66cfe Compare October 19, 2024 03:13

termination_check: ConditionItem = field(default_factory=ConditionItem)

def __post_init__(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this timer stuff probably makes the most sense living in the ActionNode, not the tree-item class. The purpose of the *Item here is to assist with serialization, and the *Node does the actual work.

We already did a bunch of work moving references away from the TreeItem into the ActionNode, it feels like a step backward to do so again.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's a very good point

@joshc-slac joshc-slac force-pushed the joshc-slac/timeout-action-node branch from 8df553d to a2c1edb Compare October 28, 2024 19:19
@joshc-slac joshc-slac force-pushed the joshc-slac/selective-caput-paradigm branch from bd66cfe to 9e7de8b Compare November 4, 2024 20:00
@joshc-slac joshc-slac changed the base branch from joshc-slac/timeout-action-node to master November 4, 2024 20:01
@joshc-slac joshc-slac changed the base branch from master to joshc-slac/timeout-action-node November 4, 2024 20:01
@joshc-slac joshc-slac force-pushed the joshc-slac/timeout-action-node branch 3 times, most recently from 3a9badf to 277f99c Compare November 8, 2024 00:06
Base automatically changed from joshc-slac/timeout-action-node to master November 8, 2024 00:09
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