Skip to content

Commit

Permalink
upgrades async driver
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmancuso committed Feb 9, 2019
1 parent 1ba0f7c commit c2c6823
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions masonite/drivers/QueueAsyncDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import inspect

from masonite.contracts import QueueContract
from masonite.drivers import BaseDriver
from masonite.drivers import BaseQueueDriver
from masonite.app import App


class QueueAsyncDriver(QueueContract, BaseDriver):
class QueueAsyncDriver(QueueContract, BaseQueueDriver):
"""Queue Aysnc Driver."""

def __init__(self, app: App):
Expand All @@ -19,7 +19,7 @@ def __init__(self, app: App):
"""
self.container = app

def push(self, *objects, args=(), callback='handle'):
def push(self, *objects, args=(), callback='handle', ran=1, channel=None):
"""Push objects onto the async stack.
Arguments:
Expand All @@ -38,3 +38,12 @@ def push(self, *objects, args=(), callback='handle'):
target=obj, args=args, kwargs={})

thread.start()

def connect(self):
pass

def consume(self, channel, fair=False):
pass

def work(self):
pass

0 comments on commit c2c6823

Please sign in to comment.