otmfaqForumsBlogsRegister
FAQMembers ListCalendarToday's PostsSearch


 Subscribe Blogs:RSS
 Subscribe Forums:RSS
 Follow New Posts:Twitter
OTMFAQ Home
OTMFAQ Blogs
OTMFAQ Forums
OTM Wiki

OTM SIG
OTM Wiki
MavenWire


SysAdmin and Management Managing and monitoring OTM / G-Log and other administrative activities.

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old July 17th, 2009, 18:25
Junior Member
 
Join Date: Jul 2007
Posts: 5
Groans: 0
Groaned at 0 Times in 0 Posts
Thanks: 2
Thanked 0 Times in 0 Posts
Rep Power: 0
rlukes is on a distinguished road
python script to execute CacheClearServlet?

Hello,

I would like to invoke the CacheClearServlet from a python script to clear out the rate cache following an automated rate load. Does anyone have a snippet of python code to do this. I have been trying to use urllib2.urlopen() but with no success.

Is this even possible?

Any assistance is greatly appreciated.

Thank you!
--Richard
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old July 17th, 2009, 19:29
chrisplough's Avatar
Site Moderator
 
Join Date: Jun 2006
Location: West Chester, PA
Posts: 1,167
Blog Entries: 8
Groans: 0
Groaned at 1 Time in 1 Post
Thanks: 143
Thanked 258 Times in 161 Posts
Rep Power: 10
chrisplough is a jewel in the roughchrisplough is a jewel in the roughchrisplough is a jewel in the rough
Send a message via AIM to chrisplough
Re: python script to execute CacheClearServlet?

Richard,

Unfortunately, I don't have a snippet of Python code. I know that we're doing something similar with our monitoring infrastructure, though, as we have it log into OTM and run certain functionality. So - I know it's possible, but not sure of the actual code or how to accomplish in Python.

--Chris
__________________
Chris Plough
MavenWire

www.MavenWire.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old July 17th, 2009, 19:51
Member and Blogger
 
Join Date: Oct 2007
Location: Netherlands
Posts: 209
Groans: 0
Groaned at 2 Times in 1 Post
Thanks: 18
Thanked 31 Times in 28 Posts
Rep Power: 3
LourensGlog is on a distinguished road
Send a message via AIM to LourensGlog Send a message via Yahoo to LourensGlog
Re: python script to execute CacheClearServlet?

I picked up this procedure on my way:

How To Invoke the cache clear servlet automatically
You can schedule any topic with standard parameter types via the Process Control Manager
The actual topic class is glog.server.workflow.adhoc.ClearCaches. It takes the following arguments:
  • cache = the name of the cache to clear. If unspecified, clears all caches.
  • zone = the zone of the caches to clear. If unspecified, clears all zones.
  • exactMatch = if true, cache is a single cache. Otherwise, it is a cache prefix.
  • clearRating = if true, the action calls PerfTestActionSessionWrapper.clearAllBusinessCache s(), otherwise it just clears the low-level caches.

There are two ways to schedule this:
  • Add a record to PROCESS_CONTROL_REQUEST where
  • TOPIC_CLASS_NAME = glog.server.workflow.adhoc.ClearCaches
  • TOPIC_PARAMETERS = -clearRating true
  • NEXT_PROCESS_TIME = GMT time to run
You can also schedule it as a recurring process
  • Use the expanded process control UI via: glog.webserver.processcontrol.ProcessServlet?userL evel=qa. This will show nearly all topics including Clear Caches. Scroll to the bottom of the topic list and you'll see the topic under Utility.

There's also a topic to reset rating engine caches, Reset Rate Engine Caches. This maps to glog.server.workflow.utility.ClearRECachesTopic. It's not a generic cache clearer, but may be what you want. It calls
  • RatingEngine.clearRateEngineCaches();
  • BaseOrderBundle.refresh();
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 3 Users Say Thank You to LourensGlog For This Useful Post:
acuartero (July 17th, 2009), chrisplough (July 17th, 2009), rlukes (July 17th, 2009)
  #4 (permalink)  
Old July 19th, 2009, 10:41
Senior Member
 
Join Date: Apr 2008
Location: Taiwan
Posts: 209
Groans: 0
Groaned at 0 Times in 0 Posts
Thanks: 12
Thanked 96 Times in 73 Posts
Rep Power: 3
josephliang will become famous soon enoughjosephliang will become famous soon enough
Send a message via MSN to josephliang Send a message via Skype™ to josephliang
Re: python script to execute CacheClearServlet?

Here is a example of using Topic XML that I used to clean Order Release cache.
Attached Files
File Type: doc CleanCache using TopicXML.doc (140.5 KB, 11 views)
__________________
--
Joseph Liang
Enterprise Integration, Inc.

http://www.eiisolutions.net/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 2 Users Say Thank You to josephliang For This Useful Post:
chrisplough (July 20th, 2009), rlukes (July 20th, 2009)
Reply


Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
OTM 5.5 - error attempting to run ClientUtil.py python script rlukes Data Loading 3 April 14th, 2009 18:19
Not able to execute RUN SOLVER command for Bids from carrier in Procurement module cool_brat Planning 0 March 5th, 2009 11:33
Python For Integration gurujala Integration and Data Mapping 1 November 24th, 2008 15:19
Invoking a Custom python or Shell script prasad Feature Requests and Inquiries 2 March 16th, 2008 22:08
[SCRIPT] DB Usage - mw-dbusage.sql chrisplough Database Administration 2 May 15th, 2007 17:12



All times are GMT. The time now is 18:12.
Copyright © 2006-2009, Open Book Solutions LLC. All rights reserved.


Inactive Reminders By Icora Web Design

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40