Page MenuHomePhorge

D593.1775258893.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D593.1775258893.diff

diff --git a/bin/kolab_smtp_access_policy.py b/bin/kolab_smtp_access_policy.py
--- a/bin/kolab_smtp_access_policy.py
+++ b/bin/kolab_smtp_access_policy.py
@@ -1219,6 +1219,12 @@
else:
engine = create_engine(cache_uri, echo=False)
+ if conf.drop_tables:
+ log.info(_("Dropping caching tables from database"))
+ policy_result_table.drop(engine, checkfirst=True)
+ statistic_table.drop(engine, checkfirst=True)
+ return False
+
try:
metadata.create_all(engine)
except sqlalchemy.exc.OperationalError, e:
@@ -1594,6 +1600,13 @@
_("Access Policy Options")
)
+ access_policy_group.add_option( "--drop-tables",
+ dest = "drop_tables",
+ action = "store_true",
+ default = False,
+ help = _("Drop the caching tables from the " + \
+ "database and exit."))
+
access_policy_group.add_option( "--timeout",
dest = "timeout",
action = "store",
@@ -1626,6 +1639,9 @@
policy_requests = {}
+ if conf.drop_tables:
+ sys.exit(0)
+
# Start the work
while True:
policy_request = read_request_input()

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 3, 11:28 PM (1 d, 23 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18827266
Default Alt Text
D593.1775258893.diff (1 KB)

Event Timeline