Skip to content
This repository has been archived by the owner on Mar 14, 2019. It is now read-only.

Latest commit

 

History

History
110 lines (69 loc) · 2.85 KB

commands.rst

File metadata and controls

110 lines (69 loc) · 2.85 KB

Commands

RUNALYZE offers cli commands for simplifying some tasks. You can run them with:

php bin/console <command>

To see all available commands just execute:

php bin/console

General

Clear cache

cache:clear --env=prod

Clears the production environment cache, the same is possible for the dev environment with --env=dev. This command clears the general cache for e.g. the app kernel, the DI container, annotations and twig templates. For clearing doctrine's cache (if you changed some entities), you need to run doctrine:cache:clear-metadata or clear var/cache/doctrine/ manually.

Install RUNALYZE

runalyze:install

Creates RUNALYZE database schema

Update RUNALYZE

doctrine:migrations:migrate

Update database schema

Cleanup

Cleanup Registrations

runalyze:cleanup:registrations <days>

Remove all not activated users older than x (default 7) days.

Clear Notifications

runalyze:notification:clear

Removes all expired notifications from database

Activities

Bulk import

runalyze:activity:bulk-import <username> <path to folder with activity files>

Imports all activity files within a folder. Will check for duplicates.

Notifications

Creates notifications for either all user or specific users (by language or id). Template must exists in data/views/notifications and has to be a yaml file.

runalyze:notification:create <TemplateName>

Example notification (e.g. update.yaml):

text: "We've updated RUNALYZE. Have a look at what's new."
link: http://blog.runalyze.com/

Optional parameters (examples):

--lang=de                           # add notification to all users where the actual set language is "de" (german)
--exclude-lang=de                   # add notification to all users where the actual set language is not "de"
--account=1                         # add notification to user with id 1 (add multiple ids by adding a further parameters: --account=1 --account=2 )
--registration-before <timestamp>   # add notificatoin to all users who registered before <timestamp>
--registration-after <timestamp>    # add notificatoin to all users who registered after <timestamp>
--last-action-before <timestamp>    # add notificatoin to all users who where active before <timestamp>
--last-action-after <timestamp>     # add notificatoin to all users who where active after <timestamp>
--lifetime <integer>                # notification lifetime in days
--force                             # do not ask to create notification(s)