This commit is contained in:
jysperm
2014-05-27 07:35:49 +08:00
parent da92c73b2f
commit 6064515ad9
3 changed files with 8 additions and 3 deletions

View File

@@ -24,9 +24,14 @@ exports.calcBilling = (account, isForce, callback) ->
amount += price * billing_time
if isForce
new_last_billing_at = new Date()
else
new_last_billing_at = new Date account.attribute.last_billing_at.getTime() + billing_time * 3600 * 1000
modifier =
$set:
'attribute.last_billing_at': new Date account.attribute.last_billing_at.getTime() + billing_time * 3600 * 1000
'attribute.last_billing_at': new_last_billing_at
$inc:
'attribute.balance': -amount

View File

@@ -34,7 +34,7 @@ module.exports =
t_name: '所有服务(默认)'
t_service: '支持所有服务'
t_resources: '磁盘: 520MB, 内存: 27MB, 流量: 37GB'
services: ['linux', 'ssh', 'phpfpm', 'mysql']
services: ['linux', 'ssh', 'phpfpm', 'mysql', 'nginx']
resources:
cpu: 144
storage: 520

View File

@@ -17,7 +17,7 @@ module.exports =
callback()
delete: (account, callback) ->
if attribute.plugin.phpfpm.is_enable
if account.attribute.plugin.phpfpm.is_enable
this.switch account, callback
else
callback()