Not sure where this goes nor has my search fu pointed me anywhere useful. Apologies in advance if I'm just being dense and wasting people's time. Just point me to the right place...
I've been pushing the envelope with my DCQuest script and seen some things that bother me. At a high level the script loops through each item. If the item can be displayed then it uses code borrowed from zarqon (Thanks, again!) to query the Jicken Wings collection database to determine a rank on the leaderboard. Since Jicken Wings updates daily, there is some caching code so that server is only hit if there is no entry in the cache or something has changed.
As a rough measure of size there are about 4000 items in my display case and approximately 1000 of them are present in quantities greater than one.
When I first wrote the script I had a sense that the collection rank of something there was only one of was uninteresting so Jicken Wings or the cache were only checked if there was more than one item. Under those conditions the script runs in an acceptable 15 minutes or less, depending upon he state of the cache. However, I discovered that for some items, having one does place on a leaderboard so I flipped the switch to check everything in the DC.
Initially, the script appeared to be doing nothing so I tweaked the verbosity and wrote the cache to disk more frequently.
Script reports that it is checking an item and uses a different message whether the cache or the Jicken Wings site is being used. After running for about 30 minutes, the script appears to stop and stay at the same item. Using the mafia Stop button seems to do something including trigger mafia's relogin actions. Under what circumstances does mafia log out due to inactivity? Is there a way for a script to tell mafia it is active even if the script isn't actually hitting KoL servers? One way to explain what I saw is that mafia logged out of KoL and the script, for reasons unknown to me, was waiting for a response from KoL that it obviously was not getting.
An alternative explanation, although not as likely based upon what happened when I restarted things, is that Jicken Wings took offense at the number of times I hit their server and stopped answering or delayed the answer. This leads to the question - is there any kind of trace functionality or something else that would tell me what line in my script was currently being executed or what command was causing a wait?
I noticed when I aborted the script it did not always run cleanly when I restarted. What is the best way to stop a running script? Is there an easier way to clean up afterward than just just shutting down mafia and restarting? Are there best practices that make scripts easier to clean up after?
Sometimes I would start a script and get a message about something already running and that the script was Queued. Is there any documentation about this? Can I view the queue or delete entries from it?
Thanks.
I've been pushing the envelope with my DCQuest script and seen some things that bother me. At a high level the script loops through each item. If the item can be displayed then it uses code borrowed from zarqon (Thanks, again!) to query the Jicken Wings collection database to determine a rank on the leaderboard. Since Jicken Wings updates daily, there is some caching code so that server is only hit if there is no entry in the cache or something has changed.
As a rough measure of size there are about 4000 items in my display case and approximately 1000 of them are present in quantities greater than one.
When I first wrote the script I had a sense that the collection rank of something there was only one of was uninteresting so Jicken Wings or the cache were only checked if there was more than one item. Under those conditions the script runs in an acceptable 15 minutes or less, depending upon he state of the cache. However, I discovered that for some items, having one does place on a leaderboard so I flipped the switch to check everything in the DC.
Initially, the script appeared to be doing nothing so I tweaked the verbosity and wrote the cache to disk more frequently.
Script reports that it is checking an item and uses a different message whether the cache or the Jicken Wings site is being used. After running for about 30 minutes, the script appears to stop and stay at the same item. Using the mafia Stop button seems to do something including trigger mafia's relogin actions. Under what circumstances does mafia log out due to inactivity? Is there a way for a script to tell mafia it is active even if the script isn't actually hitting KoL servers? One way to explain what I saw is that mafia logged out of KoL and the script, for reasons unknown to me, was waiting for a response from KoL that it obviously was not getting.
An alternative explanation, although not as likely based upon what happened when I restarted things, is that Jicken Wings took offense at the number of times I hit their server and stopped answering or delayed the answer. This leads to the question - is there any kind of trace functionality or something else that would tell me what line in my script was currently being executed or what command was causing a wait?
I noticed when I aborted the script it did not always run cleanly when I restarted. What is the best way to stop a running script? Is there an easier way to clean up afterward than just just shutting down mafia and restarting? Are there best practices that make scripts easier to clean up after?
Sometimes I would start a script and get a message about something already running and that the script was Queued. Is there any documentation about this? Can I view the queue or delete entries from it?
Thanks.