akeneo / pim-community-dev

[Community Development Repository] The open source Product Information Management (PIM)
http://www.akeneo.com
Other
954 stars 516 forks source link

Purge job execution is not working #6427

Closed pablollorens closed 4 years ago

pablollorens commented 7 years ago

Version 1.7.6

I guess the command akeneo:batch:purge-job-execution is not doing anything? Anyone can confirm this?

I expect the Imports history to be clean and also the notifications (related with those executions) on the top bar, otherwise they lead to a 404 page.

LaureBrosseau commented 7 years ago

Hello @pablollorens,

you need to specify a date like described in this documentation: https://docs.akeneo.com/1.7/cookbook/purge/purge_job_execution.html#how-to-purge-jobs-executions

Kind regards, Laure

wucherpfennig commented 7 years ago

this method does not work... or am I missing something? eg:

php app/console akeneo:batch:purge-job-execution --days=0 --env=prod

should purge all files from date < now...?

but when I go and check

app/archive/export/csv_product_export/

all files are still there.

Am I doing something wrong?

LaureBrosseau commented 7 years ago

Hello @wucherpfennig,

Try with a number of days different to 0, for instance, if you put 5 days: app/console akeneo:batch:purge-job-execution --days=5 --env=prod The command will remove all jobs executions older than 5 days, but the system will always keep the last job execution whatever its date is.

Best, Laure

wucherpfennig commented 7 years ago

Surre I will try again!

Just to make sure: this job should DELETE the exported files? eg in:

app/archive/export/csv_product_export/

this is crucial to us (you run out of space shortly with a lot media files) since it looks like although you specify a batch output folder (via json) the files are also copied to the general export archive folder.

@LaureBro Is this behavior by design or is it a bug?

nalinsavaliya commented 7 years ago

Hello @LaureBro , When I run below command, the it deletes profile history older then 1 day, but it's not removing files from from app/archive/export/%job%/

app/console akeneo:batch:purge-job-execution --days=1 --env=prod

My Question is, does above command deletes files from archive folder?

Thanks, Nalin

LaureBrosseau commented 7 years ago

Hello @nalinsavaliya, @wucherpfennig,

This purge command removes the job executions from the DB but does not remove files from app/archive. I've raised the need to our Product team, for now, the best is to place a cron task that cleans it on a regular basis.

Regards,

nicobatty commented 6 years ago

Hello @LaureBro,

Any new information on that? That would be very helpful not having to make a script for this.

Regards,

nik736 commented 6 years ago

bump, this eats a lot of disk space

ptitkosmos commented 5 years ago

Any update ? This feature would be very useful !

rakibabu commented 5 years ago

Any update on this?

hinadmin commented 5 years ago

Is it safe to remove the files in "/httdocs/app/archive/" manually? (in after performing purge)

mflasquin commented 5 years ago

Hi, I'm interested about this answer too

hammadalynaqvi commented 4 years ago

Is it safe to remove the files in "/httdocs/app/archive/" manually? (in after performing purge)

Yes @hinadmin it is safe to remove the files after the purge is executed. If you are keeping an X days of data while purging, it will be better not to remove the files for those dates!

jmleroux commented 4 years ago

This is done here since 3.2: https://github.com/akeneo/pim-community-dev/pull/10456