# Path: pq/api.py



import os
import sys
import asyncio
import threading
from pulsar.api import send, create_future
from pulsar.apps import rpc
from pq import api
    concurrent_tasks = None
    tq_app = None
    rpc = None
    schedule_periodic = False
    message_serializer = 'json'

    @classmethod
    def name(cls):
        return cls.__name__.lower()

    @classmethod
    def rpc_name(cls):
        return 'rpc_%s' % cls.name()

    @classmethod
    async def setUpClass(cls):
        # The name of the task queue application
        params = cls.params()
        params.update(
            wsgi=True,
            schedule_periodic=cls.schedule_periodic,
            rpc_bind='127.0.0.1:0',
            rpc_workers=0,
            concurrent_tasks=cls.concurrent_tasks,
            max_requests=cls.max_requests,
            message_serializer=cls.message_serializer,
            task_pool_timeout=0.1,
            task_pool_timeout_max=0.1,
            rpc_keep_alive=cls.rpc_timeout,
        )

# Path: pq/api.py



# Path: tests/app.py
import os
import sys
import asyncio
import threading
from pulsar.api import send, create_future
from pulsar.apps import rpc
from pq import api

    concurrent_tasks = None
    tq_app = None
    rpc = None
    schedule_periodic = False
    message_serializer = 'json'

    @classmethod
    def name(cls):
        return cls.__name__.lower()

    @classmethod
    def rpc_name(cls):
        return 'rpc_%s' % cls.name()

    @classmethod
    async def setUpClass(cls):
        # The name of the task queue application
        params = cls.params()
        params.update(
            wsgi=True,
            schedule_periodic=cls.schedule_periodic,
            rpc_bind='127.0.0.1:0',
            rpc_workers=0,
            concurrent_tasks=cls.concurrent_tasks,
            max_requests=cls.max_requests,
            message_serializer=cls.message_serializer,
            task_pool_timeout=0.1,
            task_pool_timeout_max=0.1,
            rpc_keep_alive=cls.rpc_timeout,
        )

        pq = api.PulsarQueue(**params)