except:
pprint(res.content)
+def get_filters():
+ res = requests.get(CAMUNDA + "filter")
+ return res.json()
+
+def cleanup_filters(keep = ["All Tasks"]):
+ for filter in get_filters():
+ # keep filter "All Tasks"
+ if filter['name'] in keep:
+ continue
+
+ res = requests.delete(CAMUNDA + "filter/" + filter['id'])
+ if (res.status_code == 204):
+ print ("Cleaned up filter {}".format(filter['name']))
+ else:
+ print ("Error cleaning filter {} ({}): Code: {}".format(filter['name'], filter['id'], res.status_code))
+ try:
+ pprint(res.json())
+ except:
+ pprint(res.content)
+
def create_deployment(cleanup=False):
parameters = [
("deployment-name", "sentiment-analysis"),
create_deployment(cleanup=args.cleanup)
if args.cleanup:
cleanup_users()
+ cleanup_filters()
if args.autoclick >= 1:
# start clicking