import os, sys

base_dir = os.path.dirname(os.path.abspath(__file__))
relative_path = os.path.join(base_dir, "iCloudEngine/src")
sys.path.append(relative_path)

from queue_client import QueueClient


class submit_test:
    def submit(code, data):
        client = QueueClient()
        returnData = client.call(code, data)
        print(returnData)


# # 创建一个测试队列：9000 / GoogleSearch
# submit_test.submit(9000, {"keyword": keyword})

# # # 创建一个测试队列：10000 / BBCSearch
submit_test.submit(10000, {"keyword": "习近平"})
submit_test.submit(10000, {"keyword": "US election"})
submit_test.submit(10000, {"keyword": "Yahya Sinwar"})
submit_test.submit(10000, {"keyword": "Bin Laden"})

# # 创建一个测试队列：11000 / Wikipedia
# submit_test.submit(11000, {"keyword": keyword})

# # 创建一个测试队列：12000 / WebbSite
# submit_test.submit(12000, {"keyword": keyword})

# 创建一个测试队列：13000 / Crawler_NewsCN 新华网英文站在线搜索
submit_test.submit(13000, {"keyword": "china", "lang": "en"})
submit_test.submit(13000, {"keyword": "fujian", "lang": "en"})
submit_test.submit(13000, {"keyword": "shenzhen", "lang": "en"})
submit_test.submit(13000, {"keyword": "中国", "lang": "cn"})
submit_test.submit(13000, {"keyword": "吴邦国", "lang": "cn"})
submit_test.submit(13000, {"keyword": "李强", "lang": "cn"})
