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

New module type for implementing app level session draining #394

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

paulikaila-wl
Copy link
Contributor

Introduces a new interface SessionModule. If a Module implements the SessionModule interface it will be treated differently when session draining is enabled.

When session draining starts, Pitaya will call StartSessionDraining() on all registered SessionModules. And when checking if sessions have been drained, Pitaya will call SessionCount() on all registered SessionModules to check they have all reached zero.

@felipejfc
Copy link
Contributor

Thx for the contribution @paulikaila-wl! Do you mind documenting it? here: https://github.com/topfreegames/pitaya/blob/main/docs/features.md#modules

@paulikaila-wl
Copy link
Contributor Author

I added some documentation.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 8827576094

Details

  • 27 of 66 (40.91%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.3%) to 61.84%

Changes Missing Coverage Covered Lines Changed/Added Lines %
app.go 25 36 69.44%
module.go 2 30 6.67%
Files with Coverage Reduction New Missed Lines %
groups/memory_group_service.go 1 84.25%
Totals Coverage Status
Change from base Build 8807700949: -0.3%
Covered Lines: 4834
Relevant Lines: 7817

💛 - Coveralls

Copy link
Contributor

@felipejfc felipejfc left a comment

Choose a reason for hiding this comment

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

LGTM

@felipejfc felipejfc merged commit 4552001 into topfreegames:main Apr 25, 2024
4 checks passed
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.

None yet

3 participants