Skip to content

Commit

Permalink
Quick update to make no-op do something
Browse files Browse the repository at this point in the history
  • Loading branch information
mgdaily committed Feb 7, 2024
1 parent 3b49c88 commit 83d65a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion datalab/datalab_session/data_operations/noop.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ def wizard_description():
}

def operate(self, input_data):
pass
print("No-op triggered!")
8 changes: 4 additions & 4 deletions datalab/datalab_session/tasks.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import dramatiq

from datalab.datalab_session.data_operations.data_operation import available_operations

#TODO: Perhaps define a pipeline that can take the output of one data operation and upload to a s3 bucket, indicate success, etc...

@dramatiq.actor()
def execute_data_operation(data_operation_name: str, input_data: dict):
clz = available_operations().get(data_operation_name)
if clz is None:
operation_class = available_operations().get(data_operation_name)
if operation_class is None:
raise NotImplementedError("Operation not implemented!")
else:
instance = clz()
instance.operate(input_data)
operation_class().operate(input_data)

0 comments on commit 83d65a3

Please sign in to comment.