资助激励功能合并 #2

Closed
qyzh1996 wants to merge 28 commits from qyzh1996/forgeplus:dev_trustie into develop
Contributor

资助激励平台说明手册

1. 安装依赖包

使用了gem包whenever,部署时需要执行命令

bundle install

2. 配置和使用说明

sponsor功能需要实现每月的定时扣款,使用了包whenever。该包依赖于linux cron。

配置文件在config/schedule.rb中,定时任务使用cron表达式,默认的扣款时间为每月20日1点。默认的任务环境为development,如果需要在production环境中使用,请修改第22行的:development为:production。

开启定时任务需要在项目目录下打开系统控制台输入whever -w,删除任务使用whenever -c,如果开启任务后修改了配置文件,使用whenever -i可以更新任务。此外,请保证在系统设定的扣款时间时服务器在运行,否则不会扣款。如果发生这种情况,可以在rails控制台中调用Sponsorship.monthly_payment()手动完成每月扣款。

3. 用户日志

在sponsor功能上线后,为开展激励效果度量研究,我们在后端以及gitea都设计了用户日志,并设计了日志的自动切分,请不要删除较新的日志。

4. 平台完成度

目前可以完成基本的赞助相关功能,使用硬币作为赞助货币。但没有设计硬币的来源和用途,这部分需要交给trustie方面完成。

# 资助激励平台说明手册 ## 1. 安装依赖包 使用了gem包whenever,部署时需要执行命令 ``` bundle install ``` ## 2. 配置和使用说明 sponsor功能需要实现每月的定时扣款,使用了包whenever。该包依赖于linux cron。 配置文件在config/schedule.rb中,定时任务使用cron表达式,默认的扣款时间为每月20日1点。**<font color=#FF0000>默认的任务环境为development</font>**,如果需要在production环境中使用,请修改第22行的:development为:production。 开启定时任务需要在项目目录下打开系统控制台输入whever -w,删除任务使用whenever -c,如果开启任务后修改了配置文件,使用whenever -i可以更新任务。此外,请保证在系统设定的扣款时间时服务器在运行,否则不会扣款。如果发生这种情况,可以在rails控制台中调用Sponsorship.monthly_payment()手动完成每月扣款。 ## 3. 用户日志 在sponsor功能上线后,为开展激励效果度量研究,我们在后端以及gitea都设计了用户日志,并设计了日志的自动切分,请不要删除较新的日志。 ## 4. 平台完成度 目前可以完成基本的赞助相关功能,使用硬币作为赞助货币。但没有设计硬币的来源和用途,这部分需要交给trustie方面完成。
qyzh1996 added 28 commits 2020-12-18 09:20:05 +08:00
jasder closed this pull request 2021-09-18 10:09:40 +08:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Gitlink/forgeplus#2
No description provided.