cct_index

package
v0.0.0-...-1aeafd4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2023 License: MIT Imports: 22 Imported by: 0

README

诚通宏观指标、行业指标

GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -ldflags="-s -w" -o bin/cct_index cmd/cct_index/cct_index.go
chmod +x cct_index
nohup ./cct_index > cct_index.log 2>&1 &
scp bin/cct_index root@121.4.164.179:/data1/chengtong/cct/cct_index 
scp 诚通指标配置.xlsx root@121.4.164.179:/data1/chengtong/cct/诚通指标配置.xlsx

Documentation

Index

Constants

View Source
const (
	// SpiderInterval 爬虫运行时间间隔
	SpiderInterval = time.Minute * 30

	// ListenInterval 远程服务器监听时间间隔
	ListenInterval = time.Minute * 5

	// IndexValueGUID 保存历史数据唯一性的字段"ValueGUID"的集合
	// 仅保存非实时数据的ValueGUID
	IndexValueGUID = "indexes.txt"
)
View Source
const (
	SheetName = "Sheet1"
	IndexFile = "诚通指标配置.xlsx"
)

Variables

This section is empty.

Functions

func CCTIndex

func CCTIndex()

CCTIndex 城通指标爬虫逻辑

func InitIndexConfigFromExcel

func InitIndexConfigFromExcel() (ics []*model.IndexConfig, err error)

InitIndexConfigFromExcel 从Excel读取指标配置

func RemoteConnect

func RemoteConnect() bool

func RemoteListen

func RemoteListen(listener chan struct{})

RemoteListen 每隔5分钟检测一次远程服务器接口是否健康 如果远程服务器接口异常,则下发邮件通知并停止应用,待远程服务器接口正常后重新启动爬虫服务

func RunApplication

func RunApplication()

Types

type CurlResponse

type CurlResponse struct {
	TimeStamp string `json:"timestamp"`
	Status    int    `json:"status"`
	Error     string `json:"error"`
	Message   string `json:"message"`
	Path      string `json:"path"`
}

Directories

Path Synopsis
pkg
source
fx
irc
nrc
sci

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL