Coder Social home page Coder Social logo

postoffice_django's Issues

Send "from_now" parameter on publisher creation

We have two options while creating a publisher:

  • We want to receive messages from now on (from_now=true)
  • We want to receive all messages from the topic history (from_now=false)

To be able to choose, we need to send this parameter

Origin host sent to postoffice should contain full api URL

We have an API where Postoffice can list, get and delete undelivered messages. We also send origin_host as a topic's attribute while creating it, but it's not a full URL, it's just the sender's host, for example, http://my-service.com.
We would need to send the full URL for the message's API, like
http://my-service.com/api/messages.
We need to add postoffice_django URLConf into our project URL config so we don't know exactly how that path will be as it could change between projects.

Handle all postoffice_django configuration in a single config key

Now we have 3 different config keys:

  • POSTOFFICE_URL
  • POSTOFFICE_CONSUMERS
  • POSTOFFICE_TIMEOUT

Move all of them inside a single POSTOFFICE key

POSTOFFICE = {
    URL: 'http://example.com'
    CONSUMERS: [
        {
            'topic': 'some_topic', 
            'endpoint': 'http://....', 
            'type': 'http', 
            'from_now': True
        }, {
        }
    ]
    TIMEOUT: 0.5
}

Document how to contribute

Add a makefile that makes developers life easier when contributing in this repo.
Makefile commands would allow to:

  • Start local environment
  • Run tests

Also include a How to contribute section which includes how to add a migration.

Set up CI

  • Run tests CircleCI
  • Test in several environments with tox
  • Coverage report

Improve admin page

We have an admin page where we can see failed messages, but no message's information is given in the list. I think we could improve a lot just showing:

  • topic
  • error
  • created_at

Save errors from postoffice on publishing

When postoffice sent a validation error, use the 400 code, instead of the 422 that returned previously.

We must update this to retrieve all the errors sent by postoffice

Handle publish timeout

We're setting a timeout in the publish method, but if a timeout occurs it will raise an exception that we're not handling. Moreover, those messages won't be saved to be recovered from postoffice as the execution will exit before the _save_publishing_error()

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.