Skip to content

Commit

Permalink
fix remove section
Browse files Browse the repository at this point in the history
  • Loading branch information
EndoNrak committed Oct 7, 2023
1 parent 8e80fdc commit 4704a6b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ def evaluation(event: dict, context):
"Content-Type": "text/plain",
},
}
dir = "/tmp"
for f in os.listdir(dir):
os.remove(os.path.join(dir, f))
directory = "/tmp"
for root, dirs, files in os.walk(directory):
for file in files:
file_path = os.path.join(root, file)
os.remove(file_path)
for dir in dirs:
dir_path = os.path.join(root, dir)
os.rmdir(dir_path)

return response
3 changes: 1 addition & 2 deletions cloud/sam/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ Resources:
Method: get
RestApiId: !Ref TetrisAPI


GetResultsFunction:
Type: AWS::Serverless::Function
Properties:
Expand Down Expand Up @@ -254,7 +253,7 @@ Resources:
DockerTag: latest
Properties:
PackageType: Image
Timeout: 5
Timeout: 10
Events:
PostTetrisTrainingCodeEndpoint:
Type: Api
Expand Down

0 comments on commit 4704a6b

Please sign in to comment.