Sfoglia il codice sorgente

cmd_acc: explicit commit after store procedure call to go around implicit sqlachemy rollback

- GH #16
Daniel-Constantin Mierla 2 anni fa
parent
commit
ee88932d2d
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      kamcli/commands/cmd_acc.py

+ 2 - 0
kamcli/commands/cmd_acc.py

@@ -241,6 +241,7 @@ def acc_cdrs_generate(ctx):
     ctx.vlog("Run SQL stored procedure to generate CDRS")
     e = create_engine(ctx.gconfig.get("db", "rwurl"))
     e.execute("call kamailio_cdrs()")
+    e.execute("commit")
 
 
 @cli.command(
@@ -418,3 +419,4 @@ def acc_cdrs_generate(ctx):
     )
     e = create_engine(ctx.gconfig.get("db", "rwurl"))
     e.execute("call kamailio_rating()")
+    e.execute("commit")