Skip to content

Commit

Permalink
<add> arborator-backend.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
kirianguiller committed Oct 24, 2020
1 parent 433c046 commit f79c476
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 24 deletions.
3 changes: 0 additions & 3 deletions app/grew/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ def post(self, project_name: str):
parser.add_argument(name="pattern", type=str)
parser.add_argument(name="rewriteCommands", type=str)
args = parser.parse_args()
print("KK args", args)
pattern = args.get("pattern")
rewriteCommands = args.get("rewriteCommands")
# tryRule(<string> project_id, [<string> sample_id], [<string> user_id], <string> pattern, <string> commands)
print("KK", project_name, pattern, rewriteCommands)
reply = grew_request(
"tryRule",
current_app,
Expand All @@ -54,7 +52,6 @@ def post(self, project_name: str):
"commands": rewriteCommands,
},
)
print("KK reply", reply)

if reply["status"] != "OK":
if "message" in reply:
Expand Down
1 change: 0 additions & 1 deletion app/projects/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def get(self) -> List[ProjectExtendedInterface]:
# if len(grewnames ^ dbnames) > 0:
# projects_info["difference"] = True
for project in projects:
print("KK bla")
dumped_project: ProjectExtendedInterface = ProjectSchema().dump(project)
if dumped_project["project_name"] not in common:
continue
Expand Down
2 changes: 0 additions & 2 deletions app/samples/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,7 @@ def post(self, project_name: str):
# {"sent_id_1":{"conlls":{"user_1":"conllstring"}}}
sample_tree = SampleExportService.servSampleTrees(reply.get("data", {}))
sample_content = SampleExportService.sampletree2contentfile(sample_tree)
print("KK sample_tree", sample_tree)
for sent_id in sample_tree:
print("KK sent_id", sent_id)
last = SampleExportService.get_last_user(
sample_tree[sent_id]["conlls"]
)
Expand Down
1 change: 0 additions & 1 deletion app/samples/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ def delete_by_sample_name(project_id: int, sample_name: str):
.all()
)
for role in roles:
print("KK role", role)
db.session.delete(role)
db.session.commit()

Expand Down
5 changes: 1 addition & 4 deletions app/trees/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get(self, projectName: str, sampleName: str):
abort(404)

samples = reply.get("data", {})
ProjectAccessService.require_access_level(project.id, 2)
# ProjectAccessService.require_access_level(project.id, 2)
##### exercise mode block #####
exercise_mode = project.exercise_mode
project_access: int = 0
Expand Down Expand Up @@ -92,8 +92,6 @@ def post(self, projectName: str, sampleName: str):
conll = args.conll
sent_id = args.sent_id

print("KK saving", sample_name, sent_id)

if not conll:
abort(400)

Expand All @@ -114,7 +112,6 @@ def post(self, projectName: str, sampleName: str):
data=data
)
resp = reply
print("KK resp", resp)
if resp["status"] != "OK":
if "data" in resp:
response = {'status': 400, 'message': str(resp["data"])}
Expand Down
15 changes: 15 additions & 0 deletions arborator-backend.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[uwsgi]
module = wsgi:app

master = true
processes = 5

socket = arborator-backend.sock
chmod-socket = 660
vacuum = true

die-on-term = true
limit-as = 512

#location of log files
logto = /var/log/arborator-backend/%n.log
13 changes: 0 additions & 13 deletions config.ini

This file was deleted.

0 comments on commit f79c476

Please sign in to comment.