Tuesday, July 19, 2016

Release of dsq-0.6. Task queue using redis

I tired from celery/kombu bugs and wrote simple task queue https://github.com/baverman/dsq

Why? I can do better. http://dsq.readthedocs.io/en/latest/faq.html

Simple design, small code base with 100% test coverage and library-style (not framework-style) guarantees stability for production usage.

All features are done, documentation fixes and questions are welcome!

# tasks.py
import dsq
manager = dsq.create_manager()

@manager.task(queue='normal')
def add(a, b):
    print a + b

if __name__ == '__main__':
    add(1, 2)
$ python tasks.py
$ dsq worker -bt tasks normal

See full DSQ documentation.

Features

  • Low latency.
  • Expiring tasks (TTL).
  • Delayed tasks (ETA).
  • Retries (forever or particular amount).
  • Dead letters.
  • Queue priorities.
  • Worker lifetime.
  • Task execution timeout.
  • Task forwarder from one redis instance to another.
  • HTTP interface.
  • Inspect tools.
  • Supports 2.7, 3.4, 3.5 and PyPy.
  • 100% test coverage.

Thursday, February 14, 2013

How to change Skype default browser

xdg-mime default opera.desktop x-scheme-handler/http
xdg-mime default opera.desktop x-scheme-handler/https

Monday, November 22, 2010

Snaked 0.4

Next big Snaked's release. It features:

Also some minor improvements:

  • Hide tab bar on <Alt>F11.
  • Switch tabs on additional "standard" <Ctrl>PageUp/PageDown keys.
  • Automatic character encoding detection.
  • Highlight selection on <Ctrl>H.
  • All search dialogs allow activate the one item by Enter key in search entry.
  • Hints config format changed. Now it is ordinary python module.
  • Show cursor column on <Ctrl><Alt>O
  • Editor's line spacing option.
  • Hints for re.RegexObject and re.MatchObject.
  • Auto remove trailing space on file save.
  • Disable left mouse button click in text view window.
  • Rewrap text on right margin with <Alt>F.

What will be in next version?

  • Multiple snippet contexts.
  • Variable autocomplete in Django/Jinja templates.
  • Editing capabilities improving.

You can install:

sudo pip install snaked

Upgrade:

sudo pip install -U snaked

Or download package directly from PyPI. Also check install instructions.

Thursday, November 4, 2010

Bad servers, chunked encoding and IncompleteRead

Have you ever got IncompleteRead exception on trying to fetch chunked data with urllib2? I did. Look at the snippet:

import urllib2, httplib

try:
    data = urllib2.urlopen('http://some.url/address').read()
except httplib.IncompleteRead:
    # Ahtung! At this point you lose any fetched data except last chunk.

IRL most bad servers transmit all data, but due implementation errors they wrongly close session and urllib raise error and bury your precious bytes.

What you have to do to handle such situation?

I don't like any solutions which involve manual data reading loop, so I prefer to patch read function.

import httplib

def patch_http_response_read(func):
    def inner(*args):
        try:
            return func(*args)
        except httplib.IncompleteRead, e:
            return e.partial

    return inner
httplib.HTTPResponse.read = patch_http_response_read(httplib.HTTPResponse.read)

It allows you to deal with defective http servers.

Friday, October 22, 2010

First Snaked release

I'm glad to announce first realease of Snaked -- minimalist editor for python developers. Some features:
  • Python code navigation (goto definition and quick outline) and completion based on Rope refactoring library. Also Snaked can provide additional type information for rope static object infer system to allow you to complete every object in the project.
  • Light UI without unnecessary widgets.
  • Keyboard oriented control.
  • Tabbed or windowed interface on your choice.

Installing

sudo pip install snaked

Documentation

You can find detailed editor documentation in the folowing page: Snaked user manual

Feel free to post any issues, ideas and suggestions on Github page or in comments.