Skip to content

Commit

Permalink
refactor debug, comb for configs, add more status info
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorJTClarke committed Feb 3, 2022
1 parent b78633f commit 6bfd25d
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 515 deletions.
12 changes: 8 additions & 4 deletions bin/croncat.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
require('dotenv').config()
const chalk = require('chalk')
const yargs = require('yargs')
import chalk from 'chalk'
import yargs from 'yargs'
import { createDaemonFile } from '../src/createSystemctl'
import * as config from '../src/configuration'
import * as entry from '../src/index'
import * as agent from '../src/agent'
import * as rpc from '../src/rpc'
// import * as tasks from '../src/tasks'
import * as triggers from '../src/triggers'
import * as util from '../src/util'

const AGENT_ACCOUNT_ID = config.AGENT_ACCOUNT_ID

Expand Down Expand Up @@ -98,7 +98,11 @@ const tasksCmd = {
desc: 'Check how many tasks are currently available',
builder: (yargs) => yargs,
handler: async options => {
await rpc.call('get_slot_tasks', options, true)
// Deprecated in favor of web UI
// await rpc.call('get_slot_tasks', options, true)
const manager = await util.getCronManager()
const { networkId } = manager.account.connection
console.log(`${chalk.gray('View ' + networkId.toLowerCase() + ' Tasks:')} ${chalk.blueBright('https://cron.cat/tasks?network=' + networkId.toLowerCase())}`)
}
}

Expand Down
Loading

0 comments on commit 6bfd25d

Please sign in to comment.