STEAM GROUP
Archi's SC Farm Archi-ASF
STEAM GROUP
Archi's SC Farm Archi-ASF
58,282
IN-GAME
391,576
ONLINE
Founded
October 29, 2015
Language
English
Changes to farming queue content are lost on restart
I have a bot configured to FarmPriorityQueueOnly (Setting FarmingPreferences=8), so before the bot does farm any cards the games I want to farm have to bee added to the farming queue with the command fqadd. This does work nicely but the problem here is that this does work only as long as ASF is running. When I restart the app the queue is empty again. The games I add or remove from the queue don't get saved between sessions. To me this seems like a bug because it has worked in the past.

The queue seems to be persisted in the <botname>.db file, but this file does not get updated properly when I use the commands fqadd or fqrm.

Any tips here? Am I doing something wrong?
< >
Showing 1-6 of 6 comments
Archi Feb 10 @ 2:50pm 
Start from checking ASF log file, you most likely have big warning/error there about ASF being unable to save the persistent database, and that's the direct reason for your failure. Usually it happens on Linux when the user runs into permissions issue they brought upon themselves.

In normal operation, fqadd/fqrm command appropriately updates Bot.db, as you found out yourself, and unless something else either refuses to let that write happen for ASF, or actively replaces content of that file, there should be no realistic way how your scenario can happen. I personally bet on first, which would be signalized in the log the moment ASF tries to save the database, i.e. after your command.

FYI, if that's permissions error like I said, then execute command (from root, so either shell or sudo) chown -hR user:user /home/user/ArchiSteamaFarm - accordingly replacing user with your target user running asf, and path to your ASF root directory. It'll correct the error for you. Not related to ASF at all but your OS usage, but no reason for me either to force you into finding the solution yourself.
Last edited by Archi; Feb 10 @ 2:55pm
CharlieLP Feb 11 @ 11:42am 
Thanks for the superfast reply. I really didn't expect a reaction that fast.

Some kind of permissions issue was also my first hunch. But unfortunately there is no warning or error to be found in the logfiles that points in that direction. There are only unsuspicious INFO level entries.

I don't use Linux by the way, but Windows 10.

Another strange thing that seems to support my bug theory and at the same time contradict a permissions issue is the following:
If I use the fbadd/fbrm commands to update the blacklist (in contrast to fqadd/fqrm to update the farming queue) the Bot.db file is updated immediately. This by the way does also invoke updates I've made to the farming queue during the ASF session to be written to the Bot.db file. I think this could work as some kind of workaround. But invoking some dummy change to the farming blacklist only to actually persist changes to the farming queue seems quite inconvenient. But well, I think I could live with that.

Any further ideas or help would be appreciated.
Archi Feb 11 @ 12:37pm 
I've personally tried just now your scenario and no, both fqadd/fqrm as well as fbadd/fbrm produce the same output and immediately update the bot database. I even checked the code for any difference between those two and there are none, there are exactly same mechanisms and calls used, so it doesn't support your theory.

The ASF routine works in a way that it tries to update the collection in the database, and if that succeeds, i.e. there is any update, it writes it to the database. I don't see any bug in this regard, especially since I can't reproduce it.

Are you sure you're updating the correct bot? Maybe you have more than one and you're mixing things up? Are you sure no more than one ASF instance is launched for given config directory?
Last edited by Archi; Feb 11 @ 12:38pm
Ahh, thanks, I think we're making progress here.

I do have in fact two bots configured. The farming queue bot I was talking about in this thread is my primary bot. And I've tested to use fqadd/fqrm with and without the bot's name. Both didn't work as in the changes didn't get persisted.
The other bot is configured to not rely on the farming queue at all btw.

What I did then is temporarily delete the config files for the other bot (3 files in total: bot.json, bot.db and bot.bin) and restarted ASF. And suddenly it worked as expected. The changes did get persisted.
I've then restored the config files for the other bot, restarted and it still did seem to work.

Unfortunately after another restart it was all back to the previous, faulty behavior.

So it must have to do something with using more than one bot instance that leads to ASF not being able to persist to the correct bot.db.
The other bot does not have a FarmingPriorityQueueAppIDs entry at all in it's bot.db. Maybe that's why it seems that sometimes changes are persisted to nowhere.

Maybe this information can help to find a bug and resolve it. But I also have the impression that it is a pretty exotic configuration I am using. At least I have already learned a lot.
Archi Feb 12 @ 6:49am 
I don't see any bug in the code and can't reproduce what you stated either, in all different configurations, so I doubt it's a problem of the program itself - more likely that you're doing something wrong, but I don't know what besides using wrong target bot either.
CharlieLP Feb 12 @ 12:29pm 
Yeah I know it's extremely hard to find a bug if you're not able to reproduce it. Thanks a lot for your effort anyway.
I think I'll stick with the fbadd/fbrm workaround then.
< >
Showing 1-6 of 6 comments
Per page: 1530 50