Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117792782
D593.1775258893.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D593.1775258893.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D593: Add option to drop the caching tables from the database and exit
Attached
Detach File
Event Timeline