Posts that level20peon is monitoring

Subscribe to Posts that level20peon is monitoring 5 post(s) found

Jan 21, 2010
Avatar Morgan Schweers 1,076 post(s)

Topic: feature request - remove auctions after n days / after x complete auctions

Greetings,
I’m afraid I haven’t communicated clearly; this has nothing to do with scripting enabled/disabled. The capability is built into JBidwatcher already.

Try:

wget --http-passwd=$pass --http-user=$user --output-document=- --quiet --tries=1 "http://$host:9099/event?name=delete&param=$ID"

The URL is actually /event, and the queue you want to place an event on is given in the name parameter, with the value you want to inject into the queue being given in the param parameter.

Don’t worry about formatting options; I’ve fixed it up. You can use <pre></pre> to block code out, or highlight code inline with <code></code>.

— Morgan Schweers, CyberFOX!

 
Jan 21, 2010
Avatar Morgan Schweers 1,076 post(s)

Topic: feature request - remove auctions after n days / after x complete auctions

Greetings,
Let me introduce you to another of the awesome features I never really ended up documenting or exploiting in JBidwatcher…externally triggered events.

curl "http://username:password@localhost:9099/event?name=delete&param={ebay_identifier}"

That triggers an event named ‘delete’, which listens for item numbers and removes them from JBidwatcher. This is actually how the UI deletes items, by throwing them into JBidwatcher’s internal event queue named ‘delete’. There are a dozen or so internal event queues, all handled with Java threads. I built it this way so it would have a responsive UI which would produce queue entries, with all the real work done by named queue consumers. Then, when I implemented the web mode, I threw in a few lines of code (about 6!) which added a hook into the event system via the web interface. It’s amazingly powerful for firing asynchronous events, but also completely unused.

I don’t even have a list anywhere of all the events, and the parameters they take, but here are a few of the important queues…this is the first time I’ve documented this publicly, I believe.

  • Swing – has tons of commands, the processing thread for this runs on the Swing event thread so it can do UI operations safely. Look at UIBackbone.java
  • auction_manager – Just the TIMECHECK option, which tries to sync time
  • browse – Launches a browser to the provided URL
  • delete – Deletes the listing, as above
  • drop – Acts as if a drag-and-drop for the item/URL just happened
  • my – Stuff to support the My JBidwatcher future features
  • redraw – Redraws a listing on the display, refresh a category, update the font, or set the background color. :)
  • sfx – Play a sound effect in MP3 format. :) I never added any triggers, but you can send ‘/audio/bid.mp3’ to hear a sound effect
  • tray – On supported platforms, controls system tray effects (messages, stats, on/off)
  • update – Check for an update
  • user – Everything that you do through a menu goes through this queue, but it’s not really externally scriptable except very simple stuff (complex stuff involves acting on the current selection, and that’s not scriptable; simple stuff is launching various dialogs)

Case is important, all the queues except Swing are lower case.

Not all of the queues accept a string argument, but I think most of them do. I tried to move towards a database-backed queuing system, but I failed as some of the queues couldn’t accept a string argument, and not every data type serialized well, so I backed those changes out a while ago.

To be clear, what you do is request

curl “http://user:pass@localhost:9099/event?name={queue}&param={string}”
to put the event on the queue. (I put it in quotes and a curl statement so the forum software wouldn’t auto-URL-ify it. It works just as well from a Ruby script or some-such.)

Hope that helps in some way!

As for the scripting layer, I’ve been thinking more about how to offer it as an add-on, for folks who want the extra power. I truly suck at documentation, preferring to show example code over extensive documentation. I’ll see what I can do, though.

— Morgan Schweers, CyberFOX!

 
Jan 21, 2010
Avatar Morgan Schweers 1,076 post(s)

Topic: java -Xmx512m -Xmx256m -Xmx128m

Greetings,
I don’t believe it’s the database that’s taking the memory. My goal, eventually, is to offload everything TO the database, and keep only a tiny amount of the current auctions ‘in memory’. It doesn’t really work that way right now, unfortunately. Currently it keeps a great deal of information in memory, and occasionally I make a mistake and it keeps hold of some data (like parsed auctions, or searches) longer than it should, thus foiling garbage collection.

As for MySQL, out of curiosity, is there a reason you can’t use the jbidwatcher database name? I don’t dispute that it’s a bug, and I’ll definitely dig into it, but in the mean time why not use the ‘jbidwatcher’ database under MySQL as it stands?

— Morgan Schweers, CyberFOX!

 
Jan 20, 2010
Avatar Morgan Schweers 1,076 post(s)

Topic: feature request - remove auctions after n days / after x complete auctions

Greetings,
It does become pretty darn hungry… It should be possible; I just want to get things set up so folks can use my.jbidwatcher.com as an archival of auctions if they want to, before adding stuff that auto-deletes the listings from JBidwatcher’s desktop database.

This is one example of why I wish I had gotten scripting into JBidwatcher; I could give you a quickie script in probably 5-10 minutes which you could add into the scripting edition of JBidwatcher that would do exactly what you want, but my scripting version adds 10MB to JBidwatcher’s size. :( I never came up with a killer feature that would sell folks on the additional weight.

— Morgan Schweers, CyberFOX!

 
Jan 20, 2010
Avatar Morgan Schweers 1,076 post(s)

Topic: java -Xmx512m -Xmx256m -Xmx128m

Greetings,
I’m not sure; what version of Java are you running on Linux? I strongly discourage the use of non-Sun Java versions, because none of them are really ready for prime time. (I might trust an IBM Java version, but I’m not even sure they still make their own.)

That’s a Java option, not a JBidwatcher option, which is why I ask. JBidwatcher doesn’t limit its own memory usage, the command line option tells Java to limit it.

— Morgan Schweers, CyberFOX!