abstract class BitShares::Task

Overview

在纤程模式下运行的任务的抽象基类。

Direct Known Subclasses

Defined in:

bitshares-crystal/task.cr

Constant Summary

Log = ::Log.for("task")

Constructors

Instance Method Summary

Constructor Detail

def self.new(config_object : BitShares::Config | Nil = nil) #

[View source]

Instance Method Detail

def client : Client #

获取 #client 对象。


[View source]
def fiber : Fiber | Nil #

[View source]
def finished? #

任务是否运行结束判断


[View source]
abstract def main #

异步任务主方法。子类应该重新实现该方法。


[View source]
def on_exception(e) #

[View source]
def run #

[View source]
def start #

[View source]
def stop #

[View source]
def tick_per_day #

事件 - 每天调用。


[View source]
def tick_per_minute #

事件 - 每分钟调用。


[View source]