Giter Site home page Giter Site logo

openmatchmaking / sage-utils-python Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 60 KB

SDK for Open Matchmaking microservices in Python

License: BSD 3-Clause "New" or "Revised" License

Python 98.79% Makefile 0.49% Dockerfile 0.72%
open-matchmaking sdk microservices python async amqp

sage-utils-python's Introduction

sage-utils-python

SDK for Open Matchmaking microservices in Python

Features

  • Framework agnostic solution
  • Easy to write a new extension and use it later with your code
  • Base class for implementing AMQP workers
  • Register a new microservice in Open Matchmaking platform

Installation

This package should be installed using pip: :

pip install sage-utils

Example

License

The sage-utils-python is published under BSD license. For more details read LICENSE file.

sage-utils-python's People

Contributors

dependabot-support avatar relrin avatar

Watchers

 avatar  avatar

sage-utils-python's Issues

Add retries with timeouts for register worker

It will be good to add retries with timeouts for the BaseRegisterWorker class, because sometimes when we have started the cluster, each machine that depends from other can failure with an error or an exception if cant establish the connection and send the message.

Attribute error: 'MicroserviceRegisterWorker' object has no attribute 'deinit'

When the Sanic framework is using the sanic-amqp-extension package and register a custom worker which is registering microservice, before stopping the server it throws an error for deinitialization.
Error traceback from game-servers-pool microservice:

Traceback (most recent call last):
  File "./manage.py", line 14, in <module>
    manager.run()
  File "/usr/local/lib/python3.6/site-packages/sanic_script/__init__.py", line 350, in run
    result = self.handle(argv[0], argv[1:])
  File "/usr/local/lib/python3.6/site-packages/sanic_script/__init__.py", line 319, in handle
    res = handle(*args, **config)
  File "/usr/local/lib/python3.6/site-packages/sanic_script/commands.py", line 195, in __call__
    return self.run(*args, **kwargs)
  File "/app/app/commands/run_server.py", line 23, in run
    workers=self.app.config["APP_WORKERS"],
  File "/usr/local/lib/python3.6/site-packages/sanic/app.py", line 646, in run
    serve(**server_settings)
  File "/usr/local/lib/python3.6/site-packages/sanic/server.py", line 648, in serve
    trigger_events(after_stop, loop)
  File "/usr/local/lib/python3.6/site-packages/sanic/server.py", line 496, in trigger_events
    loop.run_until_complete(result)
  File "uvloop/loop.pyx", line 1364, in uvloop.loop.Loop.run_until_complete
  File "/usr/local/lib/python3.6/site-packages/sanic_amqp_ext/__init__.py", line 86, in aioamqp_free_resources
    await worker.deinit()
AttributeError: 'MicroserviceRegisterWorker' object has no attribute 'deinit'

To fix this issue will be necessary to implement the async deinit method, which is calling by the sanic-amqp-extension

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.