Skip to content

Commit

Permalink
Fix missing references and packages from porting the old driver
Browse files Browse the repository at this point in the history
  • Loading branch information
lsabi1234 committed Sep 17, 2023
1 parent 847ebde commit 6b23a75
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions rethinkdb/cli/_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@
import sys
import time
import traceback
# Unused. Delete if all tests pass even when commented
# from multiprocessing.queues import Queue, SimpleQueue

import six
from multiprocessing.queues import SimpleQueue


from rethinkdb import ast, errors, query
from rethinkdb.cli import utils_common
# from rethinkdb.logger import default_logger

try:
unicode
Expand Down Expand Up @@ -1263,6 +1261,11 @@ def import_tables(options, sources, files_ignored=None):

tables = dict(((x.db, x.table), x) for x in sources) # (db, table) => table

ctx = multiprocessing.get_context(multiprocessing.get_start_method())
error_queue = SimpleQueue(ctx=ctx)
warning_queue = SimpleQueue(ctx=ctx)
timing_queue = SimpleQueue(ctx=ctx)
"""
if six.PY3:
ctx = multiprocessing.get_context(multiprocessing.get_start_method())
error_queue = SimpleQueue(ctx=ctx)
Expand All @@ -1272,7 +1275,7 @@ def import_tables(options, sources, files_ignored=None):
error_queue = SimpleQueue()
warning_queue = SimpleQueue()
timing_queue = SimpleQueue()

"""
max_queue_size = options.clients * 3
work_queue = multiprocessing.Manager().Queue(max_queue_size)

Expand Down
2 changes: 1 addition & 1 deletion rethinkdb/cli/_restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import time
import traceback

from rethinkdb import utils_common, _import
from rethinkdb.cli import utils_common, _import

usage = (
"rethinkdb restore FILE [-c HOST:PORT] [--tls-cert FILENAME] [-p] [--password-file FILENAME] [--clients NUM] "
Expand Down

0 comments on commit 6b23a75

Please sign in to comment.