Page 1 of 1
Purge and Maintenance
Posted: Mon Jul 20, 2020 8:29 am
by Manjik
hi everyone,
Just a little question :
Is there best pratices to purge log and other cache file used by ffastans ?
Maybe a script exist to do that ?
I would like to purge, for example, the history job older than xx days (for best visibility in monitor web page) and maybe, some other file for maintenance ?
thanks a lot,
have a good day
Re: Purge and Maintenance
Posted: Tue Jul 21, 2020 7:09 am
by emcodem
Hey Manjik
i am a little surprised about this question, there is the options->Maintenance tab for cache files and ffastrans only keeps 200 records.
Can you specify what exactly you want to do? (e.g. only keep 100 records?)
Re: Purge and Maintenance
Posted: Tue Jul 21, 2020 8:14 am
by Manjik
hey emcodem,
Thanks for your reply, but i do not find this option in the workflow manager, i'm sorry
I see the maintenance tab in the workflow properties but i'm not sure it's that
i make a simple workaround powershell script to keep only the 50 last history job. It's OK but if i can do that directly with app, it's better.
Sorry, there are probably a lot of options that I don't know yet
thanks
Re: Purge and Maintenance
Posted: Tue Jul 21, 2020 8:49 am
by emcodem
Yeah sorry, i was talking about the workflow options. At least all the cache files can be taken care about there. Do you want to clean it faster than 1 day?
For cleaning jobs from the monitor file, you definitely have to use some script... so you are already on a good way here
Let me know if you need help with that.
It would probably be helpful to understand why you want to delete jobs from the monitor, wouldnt it be better to keep all history jobs forever instead of keeping a very little number?
EDIT: oh, are we talking about the jobs on the webinterface or on the built-in job monitor of the ffastrans workflow editor?
Re: Purge and Maintenance
Posted: Tue Jul 21, 2020 9:15 am
by Manjik
yes i talk about the job on the webinterface, it's for more visibility
so my script is the best way to do that if i understand correctly, in this case no problem
Re: Purge and Maintenance
Posted: Tue Jul 21, 2020 2:29 pm
by momocampo
It is maybe a good idea @Encodem, could you create something inside Webinterface Server configuration menu to specify how many jobs must be kept?
If it is possible, the new ones will overwrite the older ones, something like that.
B.
Re: Purge and Maintenance
Posted: Tue Jul 21, 2020 3:30 pm
by Manjik
if someone is interest, here is the very little powershell script (task scheduler with ExecutionPolicy Bypass) :
Code: Select all
Get-Content "C:\FFAStrans\Processors\db\cache\monitor\log.txt" | select -Last 30 | Out-File "C:\FFAStrans\Processors\db\cache\monitor\log2.txt"
Remove-Item "C:\FFAStrans\Processors\db\cache\monitor\log.txt"
Rename-Item -Path "C:\FFAStrans\Processors\db\cache\monitor\log2.txt" -NewName "log.txt"
Re: Purge and Maintenance
Posted: Wed Jul 22, 2020 7:42 am
by emcodem
Hey Manjik,
i am a little confused. So for the built in job monitor, what you do is exactly correct, thanks for sharing the powershell script!
For the webinterface things would work completely different (and as momocampo said, it will be a good idea for me to make the max number of jobs configureable).
Anyway, still it would be interesting to understand your backgrounds why you want to limit the history jobs down to such an extremely small number of jobs?
Re: Purge and Maintenance
Posted: Wed Jul 22, 2020 1:59 pm
by momocampo
Hi,
Manjik,with webinterface you can sort your jobs list by workflow name for example to reduce jobs number or you can select only the finished jobs that you want to delete and click "delete selected".
Maybe it isn't enough for you but it is workarounds
Cheers.
B.
Re: Purge and Maintenance
Posted: Tue Jul 28, 2020 3:20 pm
by Manjik
hey emcodem and momocampo,
no problem for the script and about the limit history job, it's just for best visibility and i think (but maybe not), that if the history file is light, the performance to refresh the web page is better
thanks for your support.