<commit_before>Meteor.startup ->
  Jobs  = JobCollection 'jobs'
  Jobs.remove {}

  job = new Job Jobs, 'serviceCheck',
    name: 'ETCD'
    url: Settings.etcd()
  job.repeat
    repeats: Jobs.forever
    wait: 1000 * 60
  job.retry
    wait: 1000 * 60
  job.save()

  job = new Job Jobs, 'serviceCheck',
    name: 'App Control'
    url: 'http://iqtservices.isd.org:8080/'
  job.repeat
    repeats: Jobs.forever
    wait: 1000 * 60
  job.retry
    wait: 1000 * 60
  job.save()

  Jobs.processJobs 'serviceCheck', (job, callback) ->
    HTTP.get job.data.url, (err, data) ->
      if err or not data
        Services.upsert {name: job.data.name},
          name: job.data.name
          lastCheck: new Date()
          isUp: false

        job.fail err.content
      else
        Services.upsert {name: job.data.name},
          name: job.data.name
          lastCheck: new Date()
          isUp: true
        job.done()
    callback()


  Jobs.startJobs()
<commit_msg>removed app-control from status checker<commit_after>Meteor.startup ->
  Jobs  = JobCollection 'jobs'
  Jobs.remove {}

  job = new Job Jobs, 'serviceCheck',
    name: 'ETCD'
    url: Settings.etcd()
  job.repeat
    repeats: Jobs.forever
    wait: 1000 * 60
  job.retry
    wait: 1000 * 60
  job.save()

  Jobs.processJobs 'serviceCheck', (job, callback) ->
    HTTP.get job.data.url, (err, data) ->
      if err or not data
        Services.upsert {name: job.data.name},
          name: job.data.name
          lastCheck: new Date()
          isUp: false

        job.fail err.content
      else
        Services.upsert {name: job.data.name},
          name: job.data.name
          lastCheck: new Date()
          isUp: true
        job.done()
    callback()


  Jobs.startJobs()

{'fraction_non_alphanumeric': 0.12107367218732153, 'fraction_numerical': 0.022844089091947458, 'mean_word_length': 2.0416666666666665, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1311388', 'n_tokens_mistral': 643, 'n_tokens_neox': 588, 'n_words': 153}