Giter Club home page Giter Club logo

redongo's Introduction

redongo

https://travis-ci.org/stoneworksolutions/redongo.svg?branch=v0.3.7

Synopsis

redongo is a utility written in Python that allows us to enqueue bulk saves to mongo through redis, it offers serialization for django objects and multiple Mongo connection and collections simultaneous usage. It's also horizontally scalable.

Code Example

Server:

$ python server.py --redis dev-redis --redisdb 2 --redisqueue TEST

Client

import redongo_client
redongo_client.set_application_settings(application_name, mongo_host, mongo_port, mongo_collection, mongo_user, mongo_password)
redongo_client.save_to_mongo(application_name, objects_to_save)

Motivation

Needed a solution that allows to enqueue bulk saves to mongo

Installation

Using PIP

$ pip install redongo

Downloading tar

$ python setup.py install

API Reference

WIP

Tests

$ py.test -v

Contributors

Stonework Solutions

License

Copyright (c) 2015 StoneWork Solutions

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

redongo's People

Contributors

deroky avatar apalomo avatar nsbk avatar joxblizz avatar jfarranz avatar

Stargazers

 avatar  avatar  avatar Alper Ortac avatar  avatar Carlos avatar

Watchers

James Cloos avatar  avatar Carlos avatar  avatar  avatar  avatar

redongo's Issues

Unexpected death because of TypeError in pickle loads

INFO:root:Starting Redongo Server..
INFO:root:Loading disk queues...
INFO:root:Loading disk queue took 0.000295877456665
INFO:root:Loading returned disk queue took 0.000118017196655
INFO:root:Running!
INFO:root:Got 2 objects from returned disk queue redongo_disk_queue_returned
ERROR:root:Stopping redongo because unexpected exception: Traceback (most recent call last):
  File "redongo_server.py", line 154, in run
    obj = pickle.loads(orig_obj)
TypeError: must be string, not None

INFO:root:Setting run_stopped to True
INFO:root:Stopping app
INFO:root:Waiting for run_stopped
INFO:root:Returning memory data to Disk Queue
INFO:root:2 objects returned to Disk Queue
INFO:root:Exiting program!

Unexpected death

May  3 09:39:04 PID: 4544 redongo_server.py run ERROR Stopping redongo because unexpected exception: Traceback (most recent call last):
  File "redongo_server.py", line 166, in run
    obj_data = ser.loads(obj[1])
    ImportError: No module named django.db.models.base
May  3 09:39:04 PID: 4544 redongo_server.py run INFO Setting run_stopped to True
May  3 09:39:04 PID: 4544 redongo_server.py stopApp INFO Stopping app
May  3 09:39:04 PID: 4544 redongo_server.py sigtermHandler INFO Waiting for run_stopped
May  3 09:39:04 PID: 4544 redongo_server.py back_to_disk INFO Returning memory data to Disk Queue
May  3 09:39:04 PID: 4544 redongo_server.py back_to_disk INFO 106 objects returned to Disk Queue
May  3 09:39:04 PID: 4544 redongo_server.py sigtermHandler INFO Exiting program!

Error installing Python package via `pip`

There's an error installing via pip, find attached error trace:

cgarcia@test-ubuntu:stoneportal$ sudo pip install redongo
Downloading/unpacking redongo
  Downloading redongo-0.3.7.tar.gz
  Running setup.py egg_info for package redongo
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/home/cgarcia/stoneportal/build/redongo/setup.py", line 7, in <module>
        install_reqs = pip.req.parse_requirements('requirements.txt', session=pip.download.PipSession())
    AttributeError: 'module' object has no attribute 'req'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 14, in <module>

  File "/home/cgarcia/stoneportal/build/redongo/setup.py", line 7, in <module>

    install_reqs = pip.req.parse_requirements('requirements.txt', session=pip.download.PipSession())

AttributeError: 'module' object has no attribute 'req'

----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in /home/cgarcia/.pip/pip.log

Add support for Redis Sentinel

Allow definition of Redis Sentinels backends.

Parameters needed are:

  • Master name
  • List of Sentinel hosts as a tuple (host, port)

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.