         logger.error("Can not determine my ip")
 
     await downloadMaterials()
+
+    await setActivated()
 
     app.listen port, () ->
         logger.info 'App listening on port ', port

import setupMetrics from './metrics/metrics'
import sendToGraphite from './metrics/graphite'
import downloadMaterials from './materials/downloadMaterials'

import notify from './metrics/notify'



port = (process.env.OPENSHIFT_NODEJS_PORT || process.env.PORT || 3000)

setActivated = () ->
    users = await User.findAll()
    promises = users.map((user) -> user.setActivated(user.userList != "unknown"))
    await Promise.all(promises)

start = () ->
    try
