#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# def fake_job( ) : #NEWLINE# #INDENT# import psycopg2 #NEWLINE# import psycopg2.extensions #NEWLINE# time . sleep ( 1 ) #NEWLINE# conn = psycopg2 . connect ( 'dbname=test_django-pq host=localhost user=django-pq' ) #NEWLINE# conn . set_isolation_level ( psycopg2 . extensions . ISOLATION_LEVEL_AUTOCOMMIT ) #NEWLINE# curs = conn . cursor ( ) #NEWLINE# curs . execute ( 'SELECT pg_notify(%s, %s);' , ( 'farq' , str ( 2 ) ) ) #NEWLINE# #UNINDENT# p = multiprocessing . Process ( target = self ) #NEWLINE# p . start ( )