Browse Source

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

- GH #16
Daniel-Constantin Mierla 2 years ago
parent
commit
ee88932d2d
1 changed files with 2 additions and 0 deletions
  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")