-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create #1
base: master
Are you sure you want to change the base?
Conversation
self, email: str, request_datetime: datetime, full_name: str | ||
) -> dict: | ||
|
||
signup = self.createSignupObject(full_name, request_datetime) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signup not being used anywhere?
p = Process(target=self.c, args=(email, full_name, request_datetime)) | ||
p.start() | ||
|
||
def c(self, email, full_name, request_datetime): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function name not explicit
Item={ | ||
'email': email, | ||
"uuid": str(uuid.uuid4()), | ||
"name": full_name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate code between this and createSignupObject
|
||
signup = self.createSignupObject(full_name, request_datetime) | ||
|
||
p = Process(target=self.c, args=(email, full_name, request_datetime)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why a child process is being created to make a call to dynamodb
response = client.create('[email protected]', '11/10/2020', 'Stu Mason') | ||
|
||
|
||
print(result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No assertion?
dynamodb = boto3.resource("dynamodb", region_name="eu-west-1") | ||
|
||
table = dynamodb.create_table( | ||
TableName="contacts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Table used is signup, but this is creating contacts
|
||
p = Process(target=self.c, args=(email, full_name, request_datetime)) | ||
p.start() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function isn't returning anything. It's supposed to return a dict
ContactWrite: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
CodeUri: . | ||
Handler: handler_c_contact.h | ||
Runtime: python3.7 | ||
Policies: | ||
- AmazonDynamoDBFullAccess | ||
Events: | ||
Write: | ||
Type: Api | ||
Properties: | ||
Path: /write | ||
RestApiId: !Ref SignupApi | ||
Method: POST |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spacing wrong, handler name sucks, policy is too much (just be read/write on the signups table would be idea)
No description provided.