@Velborg opened this Issue on April 5th 2016

I delete data with the ./console core:delete-logs-data like this :
./console core:delete-logs-data --dates=2016-03-23,2016-03-24 --idsite=1
By default the hours are 00:00:00 and i can't change them.

Is it possible to implement something to delete data but with specific hours ?
ex :
./console core:delete-logs-data --dates=2016-03-23,2016-03-24 --hours:23:50:00,23:55:00 --idsite=1 (meaning i want to delete data between 2016-03-23 23:50:00 and 2016-03-24 23:55:00)


@tsteur commented on April 5th 2016 Owner

I reckon that should be possible to implement. I have not tried it but looking at the code there might be a chance it already works by specifying --dates in format YYYY-MM-DD HH:MM:SS, YYYY-MM-DD HH:MM:SS.

@mattab would it make sense to have a new label like "administration/maintenance" or so? Meaning it is an enhancement for administration or so. Or maybe it would make sense at some point to define instead labels for different "users/roles" like "SuperUser, DevOp (administration/maintenance), Marketing, Developer (platform), Web analyst (end user analyzing reports etc), ..."

@Velborg commented on April 6th 2016

i tested but it didn't work :(
./console core:delete-logs-data --idsite=31 --dates=2016-04-04 06:25:00,2016-04-05 06:25:00

Too many arguments.

@RMastop commented on April 6th 2016 Contributor

Hi @Velborg,

Please use it by providing the command in quotes, like the following:
./console core:delete-logs-data --idsite=31 --dates="2016-04-04 06:25:00,2016-04-05 06:25:00"

You basically need to concatenate the date-time string. If the command notices a space, the following part is interpreted as a new argument.


@Velborg commented on April 6th 2016

Hello @RMastop,

Thx it's working !! :)

Maybe the delete help can notice it ?
./console core:delete-logs-data -h
--dates Delete log data with a date within this date range. Eg, 2012-01-01,2013-01-01

@tsteur commented on April 6th 2016 Owner

To finish this issue we should update the docs and explain possibility to specify hours, and ideally also write a test for it to make sure we don't break this feature.

@hpvd commented on July 15th 2016

good to see :-)
Please ad a link to docu if updated within this ticket

Powered by GitHub Issue Mirror