Skip to content

Commit

Permalink
Docs cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Aug 2, 2021
1 parent ab565ec commit 49ad6e8
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/webqueue2api/parser/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,30 +186,23 @@ def get_queue_counts() -> list:

return sorted_queue_info

def load_queues(*queues, headers_only: bool = True) -> list:
"""Returns a list of queues
Example:
[example]
def load_queues(*queues: tuple, headers_only: bool = True) -> list:
"""Returns a list of queues.
Args:
headers_only (bool, optional): Weather or not the content of items in the queue should be loaded. Defaults to True.
*queues: List of strings that represent Queue names.
*queues (tuple): List of strings that represent Queue names.
Returns:
list: A list of all the queues that were given as arguments, or all of the queues if no queues were specified
list: A list of all the queues that were given as arguments, or all of the queues if no queues were specified.
"""
# custom class creation based on stackoverflow answer
# Custom mutliprocessing classes to allow for nested multi-threading.
class NoDaemonProcess(multiprocessing.Process):
# make 'daemon' attribute always return False
def _get_daemon(self):
return False
def _set_daemon(self, value):
pass
daemon = property(_get_daemon, _set_daemon)

# We sub-class multiprocessing.pool.Pool instead of multiprocessing.Pool
# because the latter is only a wrapper function, not a proper class.
class MyPool(multiprocessing.pool.Pool):
Process = NoDaemonProcess

Expand Down

0 comments on commit 49ad6e8

Please sign in to comment.