Core libraries and tools part for pro architecture. It's a submodule - use from this perspective http://git.maniak.pro/madmaniak/pro
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
430 B
13 lines
430 B
base = require('./base')
|
|
|
|
primus = base.createPrimus(8090)
|
|
primus.on 'connection', (spark) ->
|
|
|
|
spark.on 'data', (data) ->
|
|
return if /primus::ping/.exec(data)
|
|
job = "front/#{data.event}"
|
|
payload = JSON.stringify L.merge(data, sid: spark.id)
|
|
|
|
Disque.addjob(job, payload, 60, 'replicate', 1, 'retry', 0, 'ttl', 1) (err, id) ->
|
|
return console.error(err) if err
|
|
console.log "(#{id} - #{job}): #{payload}"
|
|
|