resolved merge conflicts
This commit is contained in:
@ -9,7 +9,7 @@ import yaml
|
||||
from datetime import datetime
|
||||
from typing import List
|
||||
|
||||
from multiprocessing.connection import Connection, wait as multi_wait
|
||||
from multiprocessing.connection import Connection, PipeConnection, wait as multi_wait
|
||||
from multiprocessing.queues import Queue
|
||||
from papermill.translators import papermill_translators
|
||||
from typing import Any, Dict
|
||||
@ -50,13 +50,12 @@ def generate_id(prefix:str="", length:int=16, existing_ids:List[str]=[],
|
||||
|
||||
def wait(inputs:List[VALID_CHANNELS])->List[VALID_CHANNELS]:
|
||||
all_connections = [i for i in inputs if type(i) is Connection] \
|
||||
+ [i for i in inputs if type(i) is PipeConnection] \
|
||||
+ [i._reader for i in inputs if type(i) is Queue]
|
||||
for i in inputs:
|
||||
print(type(i))
|
||||
|
||||
ready = multi_wait(all_connections)
|
||||
ready_inputs = [i for i in inputs if \
|
||||
(type(i) is Connection and i in ready) \
|
||||
or (type(i) is PipeConnection and i in ready) \
|
||||
or (type(i) is Queue and i._reader in ready)]
|
||||
return ready_inputs
|
||||
|
||||
|
@ -409,13 +409,19 @@ class MeowTests(unittest.TestCase):
|
||||
# Test meow python job chaining within runner
|
||||
def testMeowRunnerLinkedPythonExecution(self)->None:
|
||||
pattern_one = FileEventPattern(
|
||||
"pattern_one", os.path.join("start", "A.txt"), "recipe_one", "infile",
|
||||
"pattern_one",
|
||||
os.path.join("start", "A.txt"),
|
||||
"recipe_one",
|
||||
"infile",
|
||||
parameters={
|
||||
"num":250,
|
||||
"outfile":os.path.join("{VGRID}", "middle", "{FILENAME}")
|
||||
})
|
||||
pattern_two = FileEventPattern(
|
||||
"pattern_two", os.path.join("middle", "A.txt"), "recipe_one", "infile",
|
||||
"pattern_two",
|
||||
os.path.join("middle", "A.txt"),
|
||||
"recipe_one",
|
||||
"infile",
|
||||
parameters={
|
||||
"num":40,
|
||||
"outfile":os.path.join("{VGRID}", "output", "{FILENAME}")
|
||||
|
Reference in New Issue
Block a user