<div>You can have the worker delete itself, just make sure you call ActiveRecord::Base.connection.disconect! first:</div>
<div>&nbsp;</div>
<div>ActiveRecord::Base.connection.disconect!</div>
<div>::BackgrounDRb::MiddleMan.instance.delete_worker @_job_key</div>
<div>&nbsp;</div>
<div>That shoudl ensure the db connection has been closed and delete the instance of the current worker<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 10/23/06, <b class="gmail_sendername">Bill Walton</b> &lt;<a href="mailto:bill.walton@charter.net">bill.walton@charter.net</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Eden,<br><br>Eden Li wrote:<br><br>&gt; ... you can specify a :ttl(time to live) in seconds and your worker will
<br>&gt; get killed after those seconds run out.<br><br>I'm using BackgrounDRb to monitor session activity and deleting user entered<br>data in the database when their session times out.&nbsp;&nbsp;Every time they do<br>something, their time-til-timeout gets reset.&nbsp;&nbsp;There's no notion of a max
<br>time.&nbsp;&nbsp;As long as they keep using the app, their session stays alive.<br><br>I was wondering if there's a way, inside the worker, to do the equivalent<br>of:<br>MiddleMan.delete_worker(session[:job_key])<br><br>Thanks,
<br>Bill<br>_______________________________________________<br>Backgroundrb-devel mailing list<br><a href="mailto:Backgroundrb-devel@rubyforge.org">Backgroundrb-devel@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/backgroundrb-devel">
http://rubyforge.org/mailman/listinfo/backgroundrb-devel</a><br></blockquote></div><br>