Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: ef5ba8c37d
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (22 sloc) 0.612 kb
Example Gearman Job File.
Needs to be called and reside inside a registered Django app.
import os
import time
from django_gearman.decorators import gearman_job
def reverse(input):
"""Reverse a string"""
print "[%s] Reversing string: %s" % (os.getpid(), input)
return input[::-1]
def background_counting(arg=None):
Do some incredibly useful counting to 5
Takes no arguments, returns nothing to the caller.
print "[%s] Counting from 1 to 5." % os.getpid()
for i in range(1,6):
print i
Jump to Line
Something went wrong with that request. Please try again.