Purge and Maintenance

Questions and answers on how to get the most out of FFAStrans
Post Reply
Manjik
Posts: 16
Joined: Thu Mar 15, 2018 11:16 am

Purge and Maintenance

Post 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
emcodem
Posts: 1752
Joined: Wed Sep 19, 2018 8:11 am

Re: Purge and Maintenance

Post 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?)
emcodem, wrapping since 2009 you got the rhyme?
Manjik
Posts: 16
Joined: Thu Mar 15, 2018 11:16 am

Re: Purge and Maintenance

Post by Manjik »

hey emcodem,
Thanks for your reply, but i do not find this option in the workflow manager, i'm sorry :cry:
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
emcodem
Posts: 1752
Joined: Wed Sep 19, 2018 8:11 am

Re: Purge and Maintenance

Post 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?
emcodem, wrapping since 2009 you got the rhyme?
Manjik
Posts: 16
Joined: Thu Mar 15, 2018 11:16 am

Re: Purge and Maintenance

Post 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
momocampo
Posts: 594
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Purge and Maintenance

Post 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.
Manjik
Posts: 16
Joined: Thu Mar 15, 2018 11:16 am

Re: Purge and Maintenance

Post 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"

emcodem
Posts: 1752
Joined: Wed Sep 19, 2018 8:11 am

Re: Purge and Maintenance

Post 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?
emcodem, wrapping since 2009 you got the rhyme?
momocampo
Posts: 594
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Purge and Maintenance

Post 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.
Manjik
Posts: 16
Joined: Thu Mar 15, 2018 11:16 am

Re: Purge and Maintenance

Post 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.
Post Reply