Skip to content

Commit

Permalink
sqlite 호환성.. 근데 MySQL에선 잘 됐었네...?
Browse files Browse the repository at this point in the history
  • Loading branch information
jenny ruby authored and jenny ruby committed Feb 28, 2021
1 parent 6b4a649 commit 88dfbf0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/project/cloud/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,9 @@ def back_update_ec2_info(instance_id):
network = NetInterface(net_interface_id, subnet_id, cloud_id, attached_at)
db.session.add(network)
db.session.commit()



# except KeyError:
# print("[Console] Ec2 Instance Public IP is not assigned, check EC2 Console. Retry after 5 seconds")
# # q.enqueue(back_update_ec2_info, instance_id)
Expand Down Expand Up @@ -437,10 +440,10 @@ def back_ec2_create_ec2( param):
)
cloud_id = param["cloudid"]
instance_id = instance["Instances"][0]["InstanceId"]
cloud = Cloud.query.get(cloud_id)
cloud = Cloud.query.filter_by(id=cloud_id).first()
cloud.aws_instance_id = instance_id
cloud.status = "Running"
secgroup = SecurityGroup.query.filter_by(sec_group_id=param["security-group-id"]).first()
cloud.status = "Running"
secgroup = SecurityGroup.query.filter_by(sec_group_id=param["security-group-id"][0]).first()
secgroup.associated_to = cloud_id

db.session.add(cloud)
Expand Down

1 comment on commit 88dfbf0

@kimjayney
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이렇게 구현해도 MySQL에서 잘 될것 같은데 ㅠ..

Please sign in to comment.