feat: recurring payment streams + fix turrets runner signal handlers (#217 #43) - #463
Open
Nathydre wants to merge 1 commit into
Open
Conversation
Issues addressed: - FinChippay#217: Add recurring payment scheduling via time-locked stream chains - Added RecurringStreamConfig and RecurringStream structs - Implemented open_recurring_stream(): creates first cycle stream, stores recurring config, emits recurring_cycle_start event - Implemented advance_recurring_stream(): anyone can call; closes current cycle stream, opens next cycle with fresh deposit, emits recurring_cycle_end and recurring_cycle_start events - Implemented get_recurring_status() view function - Added RecurringStreamCount and RecurringStream DataKey variants - Max cycles enforcement: stream marked completed when max_cycles reached - Uses existing open_stream/close_stream for per-cycle management - FinChippay#43: Bug: Turrets runner interval not stopped on graceful shutdown - Added SIGTERM and SIGINT signal handlers to turretsServer.js - Handlers call stopRunner() to clear the setInterval before exit - Server.close() ensures in-flight HTTP requests complete before exit - Prevents HTTP requests to Horizon/CoinGecko after shutdown begins Closes FinChippay#217, closes FinChippay#43
|
@Nathydre is attempting to deploy a commit to the Topmatrixmor2014 Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes two issues assigned to @Nathydre:
#217: Add recurring payment scheduling via time-locked stream chains
RecurringStreamConfigandRecurringStreamstructsopen_recurring_stream(): creates first cycle stream, stores recurring config, emitsrecurring_cycle_starteventadvance_recurring_stream(): anyone can call; closes current cycle, opens next with fresh deposit, emitsrecurring_cycle_end+recurring_cycle_starteventsget_recurring_status(): view function returning current recurring stream statemax_cyclesreachedopen_stream/close_streamfor per-cycle management#43: Bug: Turrets runner interval not stopped on graceful shutdown
SIGTERMandSIGINTsignal handlers toturretsServer.jsstopRunner()to clear thesetIntervalbefore exitserver.close()ensures in-flight HTTP requests complete before exitCloses #217, closes #43