Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 809 Bytes

README.md

File metadata and controls

35 lines (27 loc) · 809 Bytes

How to use Queick

This document explains how to use queick practically.

The simplest usage

First, queick worker is needed to be started.

$ queick

Here's the simplest example of a job execution in Python. It only displays 'hello' at queick worker's terminal after 1 second.

Most importantly, the job itself and the enqueue method must be written in separated files.

# jobfunc.py
import time
def function(arg):
    time.sleep(1)
    print(arg)

# test.py
from queick import JobQueue
from jobfunc import function
from time import time

q = JobQueue()
q.enqueue(function, args=("hello",))

Detailed usage