Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandf committed Jan 2, 2024
1 parent 2633fd8 commit fe63c86
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 4 additions & 3 deletions src/engine/src/core/ioc/IOCContainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ def __init__(self):
self._configurations = {}
self._cache = {}

# Adds the handler that will be return - and if specified, cache - an
# instance of a class
def register(self, key, handler: callable, as_singleton=False):
self._configurations[key] = {
"handler": handler,
"as_singleton": as_singleton
}

# NOTE *args and **kwargs not really implemented in handlers, but good
# to leave it for extensibility. Perhaps in the future, we may want the object
# loading to be configurable.
# Loads an instance from the cache if registered as a singleton, or
# instantiates a new object by calling the registered handler
def load(self, key):
if key in self._cache:
return self._cache[key]
Expand Down
6 changes: 1 addition & 5 deletions src/engine/src/core/tasks/executors/Function.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def _setup_python_container(self):
name="_OWE_ENTRYPOINT_FILE_PATH",
value=os.path.join(self.task.container_exec_dir, entrypoint_filename)
)

# If the task has an entrypoint defined, set the code to be executed in the entrypoint
# to the bootstrap code
if self.task.entrypoint != None:
Expand Down Expand Up @@ -270,11 +271,6 @@ def _setup_python_container(self):
entrypoint_cmd = f"python3 {entrypoint_py} 2> {stderr} 1> {stdout}"
args = [f"{install_cmd} {entrypoint_cmd}"]

print(f"\n\nFUNCTION {self.task.id}")
print("COMMAND", command)
print("ARGS", args)
print("ENTRYPOINT ENV VAR", entrypoint_env_var)

return ContainerDetails(
image=self.task.runtime,
command=command,
Expand Down

0 comments on commit fe63c86

Please sign in to comment.