Ticket #91 (closed 需求: fixed)

Opened 14 years ago

Last modified 14 years ago

xindex定时任务

Reported by: chenchongqi Owned by:
Priority: major Milestone: 2012报价库5.0
Component: 报价库 Version: 报价库5.0
Keywords: xindex Cc:
Due Date:

Description (last modified by chenchongqi) (diff)

  • 生成文件部分
    • 两个任务:增量同步、全同步
    • 本地检查文件
    • 分发到索引服务器
  • 更新索引部分
    • 更新本地索引文件 ant -buildfile server.xml flush
    • 检测服务状态 ant -buildfile server.xml check-index
    • 安装
      • 安装ant 1.8
      • copy mail-1.4.jar Download到ant_home/lib
      • 配置server.xml Download中相关属性:
            <property name="index" location="index"/>
            <property name="work" location="work"/>
            <property name="indexbackup"  location="indexbackup"/> 
            <property name="mail-server"  value="192.168.11.232"/>  
            <property name="mail-port"  value="25"/>
            <property name="mail-user"  value="abc@pconline.com.cn"/>
            <property name="mail-passwd"  value="abc"/>
            <property name="mail-list"  value="chenchongqi@pconline.com.cn"/>
        

Attachments

mail-1.4.jar Download (379.8 KB) - added by chenchongqi 14 years ago.
commons-net-3.0.1.jar Download (262.7 KB) - added by chenchongqi 14 years ago.
server.xml Download (3.0 KB) - added by chenchongqi 14 years ago.

Change History

comment:1 Changed 14 years ago by chenchongqi

  • Description modified (diff)

Changed 14 years ago by chenchongqi

comment:2 Changed 14 years ago by chenchongqi

  • Description modified (diff)

comment:3 Changed 14 years ago by chenchongqi

  • Description modified (diff)

comment:4 Changed 14 years ago by chenchongqi

ant也支持telnet的任务,不过要在ant的lib加上一个包commons-net-3.0.1.jar Download,脚本这样写:

<telnet server="127.0.0.1" port="11311" timeout="10">
  <write>flush_all</write>
  <read>OK</read>
</telnet>

这里的<read>OK</read>表示期待从输出里读到OK,如果没有会一直等到timeout,如果只是<read/>那就是把返回读完,如果不读完这里会卡住。

但是telnet任务没有failonerror属性,也就是说如果超时等会直接退出ant流程,没得设输出变量值给后续使用,这样后面就没法发警告邮件等处理了,所以这个任务里直接用exec来执行指令代替真正的telnet任务。

Last edited 14 years ago by chenchongqi (previous) (diff)

Changed 14 years ago by chenchongqi

comment:5 Changed 14 years ago by chenchongqi

  • Status changed from new to closed
  • Resolution set to fixed

Changed 14 years ago by chenchongqi

Note: See TracTickets for help on using tickets.