3445b5d800148a4a9f252ecbdf4cd54b2fbdf3c8,apps/domain/src/main/core/services/infra_service.py,,del_worker_msg,#Any#Any#Any#,203
Before Change
int(env.id)
for env in node.environments.get_environments(user=_current_user_id)
]
if int(_worker_id) in envs:
node.environments.delete_associations(environment_id=_worker_id)
node.environments.delete(id=_worker_id)
else:
raise AuthorizationError(
"You"re not allowed to delete this environment information!"
)
return DeleteWorkerResponse(
address=msg.reply_to,
status_code=200,
content={"msg": "Worker was deleted succesfully!"},
After Change
created_by_current_user = int(worker_id) in envs
// Owner / Admin
if not is_admin and not created_by_current_user:
raise AuthorizationError("You"re not allowed to delete this worker!")
env = node.environments.first(id=worker_id)
_config = Config(provider=env.provider, app=Config(name="worker", id=worker_id))
success = Provider(_config).destroy()
if success:
node.environments.set(
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: OpenMined/Grid
Commit Name: 3445b5d800148a4a9f252ecbdf4cd54b2fbdf3c8
Time: 2021-03-14
Author: sachinkumar04428@gmail.com
File Name: apps/domain/src/main/core/services/infra_service.py
Class Name:
Method Name: del_worker_msg
Project Name: rodluger/starry
Commit Name: 90dc62fbe5fdd36dae5c1e23ce4e255c0c1c3cc2
Time: 2019-08-29
Author: rodluger@gmail.com
File Name: starry/__init__.py
Class Name:
Method Name:
Project Name: pymc-devs/pymc3
Commit Name: ca290c94e4d9974dc56a70bc21e7f1a630c828b7
Time: 2008-11-26
Author: david.huard@15d7aa0b-6f1a-0410-991a-d59f85d14984
File Name: pymc/tests/test_graph.py
Class Name:
Method Name: