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

Open Match automatically cleans up leftover tickets #1518

Open
kazshinohara opened this issue Dec 16, 2022 · 2 comments
Open

Open Match automatically cleans up leftover tickets #1518

kazshinohara opened this issue Dec 16, 2022 · 2 comments

Comments

@kazshinohara
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
At present, Open Match users need to clean up the leftover tickets by themselves, which were not used for matchmaking.

Describe the solution you'd like
A couple of ideas here.

  1. Add paramters to CreateTicketRequest API so that users can specify the lifetime of ticket. Open Match regularly cleans up the leftover tickets according to the user-defined lifetime.

  2. Have a new API so that users can ask Open Match to regularly clean up the leftover tickets according to the create_time in each Ticket and the lifetime which users specified through this new API

Describe alternatives you've considered
One of my customers does this clearning up by CronJob & own scripts in K8s cluster.

Additional context
N/A

@MaxHayman
Copy link

I would like there to be a "LastAccessed" time so we can use a heartbeat type system. So I can say if the ticket was last checked 30+s ago I can assume they've disconnected.

@castaneai
Copy link

Hi, I have created a simple container image as a small workaround to this problem.

https://github.com/castaneai/omtools/pkgs/container/omtools%2Fom-ticket-cleaner

The following example is a k8s CronJob that periodically deletes tickets that are more than 10 minutes old.

apiVersion: batch/v1
kind: CronJob
metadata:
  name: om-ticket-cleaner
  namespace: open-match
spec:
  schedule: "* * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: om-ticket-cleaner
              image: ghcr.io/castaneai/omtools/om-ticket-cleaner:latest
              args:
                - "x.x.x.x:6379"
                - "10m"
          restartPolicy: OnFailure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants