Delayed jobs
SciNote uses delayed jobs library to do background processing, mostly for the following tasks: Sending emails, Extracting text from uploaded files (full-text search), Generating introduction tutorials, Copying/cloning large database objects, * etc.
Best option to run delayed jobs is inside a worker process. To start a background worker process that will execute delayed jobs, run the following command:
rails jobs:work
To clear all currently queued jobs, you can use the following command:
rails jobs:clear
Warning! This is not advised to do on production environments.
Adding users
To simplify adding of new users to the system, couple of special rails
tasks have been created.
The first, rails db:add_user
simply queries all the information for a specific user via STDIN, and then proceeds to create the user.
The second task, rails db:load_users[file_path,create_orgs]
takes 2 parameters as an input:
Path to .yml
file containing list of users & teams to be added. The YAML file needs to be structured properly - field names must match those in the database, users need to have a name user_<id>
, and teams name team_<id>
. For an example load users file, see db/load_users_template.yml file.
A boolean ('true' or 'false') whether to create individual teams for each user or not.
Web statistics
To check current login statistics of registered users, use rails web_stats:login
task. To check the last login of any user to the system, use rails web_stats:last_login
task.
Clearing data
Execute rails data:clean_temp_files
to remove all temporary files. Temporary files are used when importing samples.
Execute rails data:clean_unconfirmed_users
to remove all users that registered, but never confirmed their email.
Calling rails data:clean
will execute both above tasks.
Notifications
To generate a new system notification that will be sent to all SciNote users, execute rails notifications:new_system[title, message]
. Title & message can contain HTML
tags.