-exit not being respected in 1.5a

Found a bug in "Everything"? report it here
Post Reply
powershellscripter
Posts: 5
Joined: Thu Feb 22, 2024 11:53 pm

-exit not being respected in 1.5a

Post by powershellscripter »

When running a command to update a database, the -exit command is not being respect in the sense that I apply it.

I run:

Code: Select all

& "C:\ProgramData\Kane\VoidTools\Everythingx.exe" -config "\\cloud-dc1.kane.local\NETLOGON\Programs\VoidTools\configs\KaneComm.ini" -db "\\cloud-dc1.kane.local\NETLOGON\Programs\VoidTools\db\KaneComm.db" -instance 'KaneComm' -update -startup -exit
from commandline and it instantly exits everything instead of updating the db first, then exiting.

I also backed out of -exit and tried just -update and -startup and it does the search and update just fine. Also -save-db-now works as well, but in order to have it update properly on a scheduled basis, it needs to be able to -exit properly after updating, which I cannot seem to get it to do as needed.
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: -exit not being respected in 1.5a

Post by void »

I will look into improving -update -exit

For now, please try the following:

& "C:\ProgramData\Kane\VoidTools\Everythingx.exe" -config "\\cloud-dc1.kane.local\NETLOGON\Programs\VoidTools\configs\KaneComm.ini" -db "\\cloud-dc1.kane.local\NETLOGON\Programs\VoidTools\db\KaneComm.db" -instance 'KaneComm' -startup
& timeout 60
& "C:\ProgramData\Kane\VoidTools\Everythingx.exe" -config "\\cloud-dc1.kane.local\NETLOGON\Programs\VoidTools\configs\KaneComm.ini" -db "\\cloud-dc1.kane.local\NETLOGON\Programs\VoidTools\db\KaneComm.db" -instance 'KaneComm' -exit -wait

The first call will fire up Everything
The timeout call will give Everything a minute to load your db and starting processing changes.
-It's possible a reindex is required, currently -save-db -exit is not handling this.
The final call will tell Everything to exit.
Everything will save your database to disk on exit.
-wait will wait for the process to complete before returning.



Please make sure Tools -> Options -> Advanced -> db_save_on_exit is set to true.
powershellscripter
Posts: 5
Joined: Thu Feb 22, 2024 11:53 pm

Re: -exit not being respected in 1.5a

Post by powershellscripter »

Because of how large the database is, I will have to run a scheduled task that kills the first instance each half hour and then starts a new instance.

But would be nice for everything to be able to execute, update, then exit.
This is in relation to the new cloud storage "E:\\" drive issues I reported.
Being able to have the server update the db file, then exit, so clients could pull a copy of that db after updating would be nice. Problem is that the db file wont update as long as the instance is open.

But logically enough I can make due around the issue, just wanted to report that it was working as you built it too :)
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: -exit not being respected in 1.5a

Post by void »

-exit -update hasn't really changed since Everything 1.4.

Everything 1.4 does a forced update immediately after loading your database.
-update will always save an updated database.

Everything 1.5 does a background update.
The issue can occur because Everything is in a state where the database is loaded but hasn't updated yet.
The next alpha update will ensure the database is updated before saving to disk with -update.
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: -exit not being respected in 1.5a

Post by void »

Everything 1.5.0.1371a will now ensure the database is updated and saved to disk with -update or -save-db
Post Reply