<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">It appears that just posting empty json to backend update_monitor gives me what I need. </div><div class="">( If not what I asked for! ;-) </div><div class=""><br class=""></div><div class="">curl_as_osx admin pwd -d {} <a href="http://archivesspace:8089/update_monitor" class="">http://archivesspace:8089/update_monitor</a> | jq . </div><div class=""><br class=""></div><div class="">gives me (I believe, if Im understanding correctly) the items locked for editing </div><div class="">and the user editing: </div><div class=""><br class=""></div><div class=""><div style="margin: 0px; color: rgb(158, 158, 158); background-color: rgb(212, 192, 172);" class="">{</div><div style="margin: 0px; color: rgb(56, 39, 204); background-color: rgb(212, 192, 172);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #9e9e9e" class=""> </span><b class="">"/repositories/5/archival_objects/5419"</b><span style="font-variant-ligatures: no-common-ligatures; color: #9e9e9e" class="">: {</span></div><div style="margin: 0px; color: rgb(56, 39, 204); background-color: rgb(212, 192, 172);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #9e9e9e" class=""> </span><b class="">"edited_by"</b><span style="font-variant-ligatures: no-common-ligatures; color: #9e9e9e" class="">: {</span></div><div style="margin: 0px; color: rgb(1, 149, 0); background-color: rgb(212, 192, 172);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #9e9e9e" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #3827cc" class=""><b class="">"ar4xd"</b></span><span style="font-variant-ligatures: no-common-ligatures; color: #9e9e9e" class="">: </span>"2015-07-24 16:50:31 UTC"</div><div style="margin: 0px; color: rgb(158, 158, 158); background-color: rgb(212, 192, 172);" class=""> },</div><div style="margin: 0px; color: rgb(56, 39, 204); background-color: rgb(212, 192, 172);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #9e9e9e" class=""> </span><b class="">"lock_version"</b><span style="font-variant-ligatures: no-common-ligatures; color: #9e9e9e" class="">: </span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">6</span></div><div style="margin: 0px; color: rgb(158, 158, 158); background-color: rgb(212, 192, 172);" class=""> },</div><div style="margin: 0px; color: rgb(56, 39, 204); background-color: rgb(212, 192, 172);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #9e9e9e" class=""> </span><b class="">"/repositories/5/archival_objects/5431"</b><span style="font-variant-ligatures: no-common-ligatures; color: #9e9e9e" class="">: {</span></div><div style="margin: 0px; color: rgb(56, 39, 204); background-color: rgb(212, 192, 172);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #9e9e9e" class=""> </span><b class="">"edited_by"</b><span style="font-variant-ligatures: no-common-ligatures; color: #9e9e9e" class="">: {</span></div><div style="margin: 0px; color: rgb(1, 149, 0); background-color: rgb(212, 192, 172);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #9e9e9e" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #3827cc" class=""><b class="">"ar4xd"</b></span><span style="font-variant-ligatures: no-common-ligatures; color: #9e9e9e" class="">: </span>"2015-07-24 16:50:47 UTC"</div><div style="margin: 0px; color: rgb(158, 158, 158); background-color: rgb(212, 192, 172);" class=""> },</div><div style="margin: 0px; color: rgb(56, 39, 204); background-color: rgb(212, 192, 172);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #9e9e9e" class=""> </span><b class="">"lock_version"</b><span style="font-variant-ligatures: no-common-ligatures; color: #9e9e9e" class="">: </span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">6</span></div><div style="margin: 0px; color: rgb(158, 158, 158); background-color: rgb(212, 192, 172);" class=""> }</div><div style="margin: 0px; color: rgb(158, 158, 158); background-color: rgb(212, 192, 172);" class="">}</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I just want to check that no one is in the middle of an edit when I want to shut down and restart. </div><div class="">( Or know who to contact to ask them to finish up and logoff )</div><div class=""><br class=""></div><div class="">It seems to work to wait until update_monitor returns an empty JSON result. </div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""> Steve. </div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 13, 2015, at 5:48 PM, Chris Fitzpatrick <<a href="mailto:Chris.Fitzpatrick@lyrasis.org" class="">Chris.Fitzpatrick@lyrasis.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">Hi Steve,<br class=""><br class="">Trying to think off the top of my head for a solution...<br class=""><br class="">You could look at the session table in the database to see what sessions are still active.<br class=""><br class="">Or you could tail the log and see if the anything is hitting the /update_monitor with a post request. Like this:<br class="">D, [2015-07-13T16:46:44.536000 #1057] DEBUG -- : Thread-6772: POST /update_monitor [session: #<Session:0x5f7c42bf @store={:user=>"staff_system", :login_time=>2015-07-13 16:44:14 -0500, :expirable=>false}, @id="ff50b6d8d6abe7694eed4866159c000dc84d67fd6f1016e538852d0bb8b4eb69">]<br class="">D, [2015-07-13T16:46:44.540000 #1057] DEBUG -- : Thread-6772: Post-processed params: {:active_edits=>#<JSONModel(:active_edits) {"jsonmodel_type"=>"active_edits", "active_edits"=>[{"uri"=>"/repositories/2/resources/2", "user"=>"admin", "time"=>"2015-07-13T16:46:43-05:00"}]}>}<br class=""><br class=""><br class=""> That's a user's (in this case "admin") browser sending an AJAX request to check if anyone else if editing the record. <br class=""><br class="">If someone has a browser window open and their session is expired, you'll be seeing a 401 error there...<br class=""><br class="">b,chris. <br class=""><br class="">Chris Fitzpatrick | Developer, ArchivesSpace<br class="">Skype: chrisfitzpat | Phone: 918.236.6048<br class=""><a href="http://archivesspace.org/" class="">http://archivesspace.org/</a><br class=""><br class="">________________________________________<br class="">From: archivesspace_users_group-bounces@lyralists.lyrasis.org <archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of Steven Majewski <sdm7g@virginia.edu><br class="">Sent: Thursday, July 9, 2015 5:59 PM<br class="">To: Archivesspace Users Group<br class="">Subject: [Archivesspace_Users_Group] logged in admin users?<br class=""><br class="">Is there any way, other than scanning through the log files, to tell if users<br class="">are currently logged into the frontend admin webapp ? The purpose being to<br class="">check if its save to shutdown and restart the app without the chance of someone<br class="">having unsaved edits.<br class=""><br class=""><br class=""><br class=""> Steve Majewski<br class=""><br class="">_______________________________________________<br class="">Archivesspace_Users_Group mailing list<br class="">Archivesspace_Users_Group@lyralists.lyrasis.org<br class="">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group<br class=""></div></blockquote></div><br class=""></body></html>