Giter Club home page Giter Club logo

pymongo-job-queue's People

Contributors

accraze avatar feldoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pymongo-job-queue's Issues

AttributeError: 'Cursor' object has no attribute '_Cursor__id'

Traceback (most recent call last):
  File "Z:/spdaemon/app.py", line 184, in _runme
    message = self._jobqueue.next().get('data', None)
  File "Z:\Z_VirtualEnv\lib\site-packages\pymjq\jobqueue.py", line 42, in next
    tailable=True)
  File "Z:\Z_VirtualEnv\lib\site-packages\pymongo\collection.py", line 1137, in find
    return Cursor(self, *args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'tailable'
Exception ignored in: <bound method Cursor.__del__ of <pymongo.cursor.Cursor object at 0x0000000003918048>>
Traceback (most recent call last):
  File "Z:\Z_VirtualEnv\lib\site-packages\pymongo\cursor.py", line 214, in __del__
    if self.__id and not self.__killed:
AttributeError: 'Cursor' object has no attribute '_Cursor__id'

This is just in a client code daemon when calling
message = self._jobqueue.next().get('data', None)

Any Ideas ?

Python 3.4.4
Windows 8 x64
Latest MongoDb

Add Silent Mode for JobQueue

When you use the job queue, it prints waiting! every 5 seconds if there are no jobs in the queue.
https://github.com/discogs/pymongo-job-queue/blob/master/pymjq/jobqueue.py#L95

It would be awesome to have a silent kwarg on JobQueue initialization so we don't see the waiting! message clogging up the terminal in development.

Maybe something like:

from pymongo import MongoClient
from pymjq import JobQueue
client = MongoClient("localhost", 27017)
db = client.job_queue
jobqueue = JobQueue(db, silent=True)

Subscribe to channel

In v2.0.0 it would be great if we introduced channels to the queue. You should be able to assign a worker to listen to a specific channel with full pub/sub capabilities.

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.