Commit 2c26c6a5 by huluobin

订单sku

parent 3d381304
......@@ -2,6 +2,7 @@ package com.bailuntec;
import com.alibaba.druid.pool.DruidDataSource;
import com.bailuntec.job.OrderSyncJob;
import com.bailuntec.job.OrderSyncJob30;
import com.bailuntec.job.OrderSyncTask;
import com.bailuntec.listener.OrderSyncJobListener;
import com.bailuntec.utils.PropertiesUtil;
......@@ -27,8 +28,8 @@ public class Application {
private static final String EVENT_RDB_STORAGE_PASSWORD = propertiesUtil.getPropertyAsString("EVENT_RDB_STORAGE_PASSWORD");
public static void main(String[] args) {
new JobScheduler(createRegistryCenter(), createJobConfiguration(), createJobEventConfiguration(), new OrderSyncJobListener()).init();
new JobScheduler(createRegistryCenter(), createJobConfiguration1(), createJobEventConfiguration(), new OrderSyncJobListener()).init();
// new JobScheduler(createRegistryCenter(), createJobConfiguration(), createJobEventConfiguration(), new OrderSyncJobListener()).init();
// new JobScheduler(createRegistryCenter(), createJobConfiguration1(), createJobEventConfiguration(), new OrderSyncJobListener()).init();
new JobScheduler(createRegistryCenter(), createJobConfiguration2(), createJobEventConfiguration(), new OrderSyncJobListener()).init();
}
......@@ -54,7 +55,7 @@ public class Application {
propertiesUtil.getPropertyAsString("JOB_NAME30"),
propertiesUtil.getPropertyAsString("JOB_CRON30"),
propertiesUtil.getPropertyAsInt("SHARDING_TOTAL_COUNT")).build();
SimpleJobConfiguration simpleJobConfig = new SimpleJobConfiguration(simpleCoreConfig, OrderSyncJob.class.getCanonicalName());
SimpleJobConfiguration simpleJobConfig = new SimpleJobConfiguration(simpleCoreConfig, OrderSyncJob30.class.getCanonicalName());
return LiteJobConfiguration.newBuilder(simpleJobConfig).build();
}
......
......@@ -3,20 +3,22 @@ EVENT_RDB_STORAGE_URL=jdbc:mysql://gz-cdb-kp7s5i79.sql.tencentcdb.com:61691/bail
#EVENT_RDB_STORAGE_USERNAME=root
#EVENT_RDB_STORAGE_PASSWORD=123456
#ZOOKEEPER_SERVER=127.0.0.1:2181
ZOOKEEPER_SERVER=127.0.0.1:2181
EVENT_RDB_STORAGE_DRIVER=com.mysql.jdbc.Driver
#EVENT_RDB_STORAGE_URL=jdbc:mysql://10.0.8.15:3306/bailun_datacenter?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
EVENT_RDB_STORAGE_USERNAME=root
EVENT_RDB_STORAGE_PASSWORD=#7kfnymAM$Y9-Ntf
ZOOKEEPER_SERVER=172.31.255.120:2181
#ZOOKEEPER_SERVER=172.31.255.120:2181
NAME_SPACE=data-center
#JOB_NAME=base-sync-oms-order-coroutine
JOB_NAME=base-sync-oms-order
JOB_CRON=0/1 * * * * ? *
JOB_NAME30=base-sync-oms-skus30
#JOB_NAME=base-sync-oms-order
JOB_CRON30=0 0 22,23,00 * * ? *
JOB_COROUTINE_NAME=base-sync-oms-order-task
JOB_COROUTINE_CRON=0/1 * * * * ? *
JOB_COROUTINE_NAME=base-sync-oms-order-task2
JOB_COROUTINE_CRON=0/1 * * * * ?
SHARDING_TOTAL_COUNT=1
......@@ -29,7 +29,7 @@ public class OrderSyncJobTest {
public void execute() {
PointJob pointJob = new OrderSyncJob();
ShardingContext shardingContext = new ShardingContext(
new ShardingContexts("x", "base-sync-oms-order-coroutine", 1, null, new HashMap<>()), 0
new ShardingContexts("x", "base-sync-oms-order-task", 1, null, new HashMap<>()), 0
);
pointJob.execute(shardingContext);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment