Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Useful commands #49

Open
GGGGino opened this issue Nov 15, 2018 · 3 comments
Open

Useful commands #49

GGGGino opened this issue Nov 15, 2018 · 3 comments

Comments

@GGGGino
Copy link

GGGGino commented Nov 15, 2018

Hello,

what about to create some commands to accomplish common useful actions?
For example:

php bin/console mgilet:notification:clear_notification
For development purpose i had to clear notification tables several times.

If interested I already have the code

@LeandroLuccerini
Copy link
Contributor

LeandroLuccerini commented Nov 15, 2018

Hello,
i'm working on a NotificationController#removeNotificationAction maybe tomorrow i will send a PR so if you want you can first check it, i also wanted to integrate also commands like you proposed.
I was thinking of a set of commands like

  1. mgilet:notification:remove_notification : (clear_notification in your case) deletes all the notifications and all the NotifiableNotifications
  2. mgilet:notification:remove_notification --notifiable=[id]: deletes all notification (NotifiableNotification) for given Notifiable Entity
  3. mgilet:notification:remove_notification --older_than=[time]: deletes all the notifications older than given time such, for example: 3m or 10d or 2y or 1w (where m=months, d=days, y=years and w=weeks) and combinations

Obviuosly the command can combine all the options.

Setting something like a cron, this could be useful to avoid uncontrolled growth of the tables.

If you will find my PR useful (and @maximilienGilet agrees) you can fork and work on it.

@GGGGino
Copy link
Author

GGGGino commented Nov 15, 2018

Ok,

i agree on all the points. I'll wait @maximilienGilet response and i'll start working on it.

Thanks

@maximilienGilet
Copy link
Owner

Hi !

This is a great idea that could be very useful !
I don't have much time so a pull request would be nice.

Thanks for the interest in this bundle 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants