Skip to content

Conversation

@taoshidev1
Copy link
Collaborator

Taoshi Pull Request

Description

[Provide a brief description of the changes introduced by this pull request.]

Related Issues (JIRA)

[Reference any related issues or tasks that this pull request addresses or closes.]

Checklist

  • I have tested my changes on testnet.
  • I have updated any necessary documentation.
  • I have added unit tests for my changes (if applicable).
  • If there are breaking changes for validators, I have (or will) notify the community in Discord of the release.

Reviewer Instructions

[Provide any specific instructions or areas you would like the reviewer to focus on.]

Definition of Done

  • Code has been reviewed.
  • All checks and tests pass.
  • Documentation is up to date.
  • Approved by at least one reviewer.

Checklist (for the reviewer)

  • Code follows project conventions.
  • Code is well-documented.
  • Changes are necessary and align with the project's goals.
  • No breaking changes introduced.

Optional: Deploy Notes

[Any instructions or notes related to deployment, if applicable.]

/cc @mention_reviewer

@taoshidev1 taoshidev1 requested a review from jbonilla-tao March 6, 2024 00:49
if (self.order_type == OrderTypeEnum.SHORT and self.leverage > 0) or \
(self.order_type == OrderTypeEnum.LONG and self.leverage < 0):
raise ValueError("Leverage must be negative for SHORT orders and positive for LONG orders.")
if abs(self.leverage) < ValiConfig.MIN_LEVERAGE and self.order_type != OrderTypeEnum.FLAT:
Copy link
Collaborator

Choose a reason for hiding this comment

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

No check for MAX_LEVERAGE?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I dont think we have max leverage yet as a var. We should add that. Will do that as part of this PR

if __name__ == "__main__":

# Define the URL endpoint
url = 'http://127.0.0.1:5000/api/receive-signal'
Copy link
Collaborator

Choose a reason for hiding this comment

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

why port 5000?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

debug port (non-production)

@jbonilla-tao jbonilla-tao merged commit 4dffef6 into main Mar 7, 2024
@github-actions github-actions bot mentioned this pull request Oct 21, 2025
12 tasks
@github-actions github-actions bot mentioned this pull request Oct 30, 2025
12 tasks
jbonilla-tao added a commit that referenced this pull request Nov 8, 2025
Issue #2: Remove is_alive() checks from LivePriceFetcher._start_server()
- Removed all is_alive() checks that would crash when called from HealthChecker daemon
- Use terminate() and kill() directly (safe to call on dead processes)
- Rely on connect() to verify server is working instead of process checks
- Simplified startup logic with 2s wait + connection attempt

Issue #4: Move timestamp update inside lock in auto_sync.py
- Moved last_signal_sync_time_ms update into finally block inside lock
- Prevents race condition where second sync starts before timestamp updates
- Ensures timestamp is always updated even if sync fails

Issue #5: Remove unused shutdown_dict logic from daemons
- Removed shutdown_dict parameter from HealthChecker.__init__()
- Removed shutdown_dict parameter from FeatureRefresher.__init__()
- Changed while loops from "while not self.shutdown_dict" to "while True"
- Daemons run indefinitely and terminate when main process exits (daemon=True)
- Updated validator.py to not pass shutdown_dict to daemon initializations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
jbonilla-tao added a commit that referenced this pull request Nov 8, 2025
Issue #2: Remove is_alive() checks from LivePriceFetcher._start_server()
- Removed all is_alive() checks that would crash when called from HealthChecker daemon
- Use terminate() and kill() directly (safe to call on dead processes)
- Rely on connect() to verify server is working instead of process checks
- Simplified startup logic with 2s wait + connection attempt

Issue #4: Move timestamp update inside lock in auto_sync.py
- Moved last_signal_sync_time_ms update into finally block inside lock
- Prevents race condition where second sync starts before timestamp updates
- Ensures timestamp is always updated even if sync fails

Issue #5: Remove unused shutdown_dict logic from daemons
- Removed shutdown_dict parameter from HealthChecker.__init__()
- Removed shutdown_dict parameter from FeatureRefresher.__init__()
- Changed while loops from "while not self.shutdown_dict" to "while True"
- Daemons run indefinitely and terminate when main process exits (daemon=True)
- Updated validator.py to not pass shutdown_dict to daemon initializations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@github-actions github-actions bot mentioned this pull request Nov 10, 2025
12 tasks
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.

3 participants