Skip to content

Commit

Permalink
Maj requete
Browse files Browse the repository at this point in the history
tentative pour màj des requête
  • Loading branch information
Patent2net committed Sep 25, 2021
1 parent 015678b commit 1885c8d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,19 @@ def split_request(p2n_dir):

return get_error_response("Spliter not needed for this directory")

@app.route('/api/v1/requests/<p2n_dir>/update', methods=['POST'])
def update_request(p2n_dir):
print(p2n_dir)
os.chdir("/home/p2n/P2N-V3/")


command="p2n run --config=../RequestsSets/%s"%(p2n_dir) + ".cql"
os.system(command)

return get_success_response("OK", {
"directory": p2n_dir
})

@app.route('/api/v1/requests/<p2n_dir>/interface', methods=['POST'])
def update_one_request_interface(p2n_dir):
print(p2n_dir)
Expand Down
2 changes: 1 addition & 1 deletion p2n/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def classic_interface(options):
compt += 1
# run_script('P2N-PreNetworks.py {network}'.format(network=network), configfile)
run_script('P2N-NetworksBis.py {network}'.format(network=network), configfile)
AnnonceProgres (Appli = 'p2n_network', valMax = len(networks), valActu = compt*100/len(networks)) # valMax is unused in front end
AnnonceProgres (Appli = 'p2n_network', valMax = 100, valActu = compt*100/len(networks)) # valMax is unused in front end
# run_script('P2N-NetworksJS.py {network}'.format(network=network), configfile)
#adding the complete net a buggy very very slow process

Expand Down

0 comments on commit 1885c8d

Please sign in to comment.