Results 1 to 7 of 7

Thread: Add way(s) to [prevent mess up of / reinitiate] important 1/ascension processes

  1. #1
    Senior Member
    Join Date
    Apr 2019
    Posts
    283

    Default Add way(s) to [prevent mess up of / reinitiate] important 1/ascension processes

    Split of the 2nd point of https://kolmafia.us/showthread.php?2...it-in-valhalla

    Currently, there are some (possibly lengthy) 1/ascension processes that mafia will do. While doing them, it is still possible to use the relay browser. This is, in all, fine, unless the user happens to go in a "limit mode" (improper term?) (like choice adventures. Basically, anything that forces "choosing an option" as your next move, with no way to simply exit the choice by visiting another URL).

    If ever doing this, all processes happening in the background will abort (because they are expecting to get a response to their request, but are all getting the choice adventure back as a response, as you are locked there).


    I think we have... 2-4 possibilities here?

    1- prevent the use of the relay browser while those processes are being handled.
    Could lead to a general slow-down of things? Most of the time, being able to use the relay browser during those processes is a good thing....

    1.1- Only prevent the visit of "limit modes" (again, term may be wrong) during these processes? (for example, prevent the use of the Beach Comb) Problem is, it's not like it's simple to tell what relay request would lead to one of those.....


    2- Allow a way to manually redo these processes. May not be a good idea; was more or less discarded by Veracity, but putting this here for the record.

    2.1- Have mafia "log" where an error first occurred during these processes, and allowing the user to restart them from where that error first happened..?
    For example: taking a process with 5 steps
    - the first step goes fine
    - during the second step, mafia gets an unexpected response. Mafia then stops doing the 2nd step, and logs that it got a bad response on step 2.
    - during step 3-5, mafia gets passed that it got an error on step 2, so it doesn't do step 3-5.
    result: mafia signals that the process could not be fully done, and offers to do it again.
    If doing it again: re-initiates the process, remembering that it previously got an error on step 2.
    - on the first step, mafia sees that the error previously happened on step 2, which means step 1 went fine, so it skips step 1.
    - on step 2, mafia sees that the error previously happened on step 2. Since this is step 2, mafia clears the error, and does the step.
    - step 3-5 goes fine (possibly with this whole error handling thing happening again)

  2. #2
    Senior Member
    Join Date
    Apr 2019
    Posts
    283

    Default

    Logging what was previously said about this topic:

    ALSO also, is there/could there be a way to manually do the "on ascension" processes?
    Sometimes, they fail (because of me doing things in the relay browser while not noticing that they were still running in the background), and I end up with things such as free pulls not being pulled, the spookyraven letter not being read, and so on...
    Don't do that. This is ValhallaManager.postAscension, which resets a lot of state, pulls 3 free pull items (VIP key, cursed microwave, cursed pony keg), runs YOUR postAscensionScript, visits your clan to update available VIP lounge items, resets daily deeds, and on and on.

    If I know that I messed up the on-ascension process, any way to re-initiate it?
    No. Seriously, don't do that.

    Perhaps there could be a way to have the relay browser refresh a page saying that it is "automating", while lengthy processes happen. I have a length kingLiberatedScript, for example, and when I click the prism, KoL seems to freeze for a long time while it runs. Doing postAscension processing - which includes your postAscensionScript - also makes KoLmafia seem to freeze for a while.
    Originally Posted by Veracity View Post

  3. #3
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,868

    Default

    I don't see this being solved in general. If I was told I had to craft and implement a solution I would start with a list of the specific things that are "critical" or once per Ascension and that are being done by native KolMafia by itself and not by a script. Since everything on that list would be mafia code it could presumably be isolated and protected from interruptions while it was running.

    So what are the "(possibly lengthy) 1/ascension processes that mafia will do"?

  4. #4
    Senior Member
    Join Date
    Apr 2019
    Posts
    283

    Default

    So what are the "(possibly lengthy) 1/ascension processes that mafia will do"?
    Originally Posted by fronobulax View Post
    Right now, I guess the only examples I have are the processes being done when exiting valhalla, and when breaking the prism.

  5. #5
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,671

    Default

    So when you break the prism or exit valhalla, you don't wait until you see the expected output page and go and navigate somewhere else, which apparently interrupts those other processes?

    Why do you do that?

  6. #6
    Senior Member
    Join Date
    Apr 2019
    Posts
    283

    Default

    because rollover is set to happen in just a few minutes, and I'm racing against the clock...

  7. #7
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,868

    Default

    because rollover is set to happen in just a few minutes, and I'm racing against the clock...
    Originally Posted by fredg1 View Post
    A cranky wise person once said that a lack of planning on your part does not justify a crisis on mine :-)
    Well, thank you.
    Originally Posted by Veracity View Post

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •