当前位置: 首页 > news >正文

50强网站建设公司seo关键词排名优化官网

50强网站建设公司,seo关键词排名优化官网,网上做翻译兼职网站,小程序设计要多少钱文章目录 背景尝试1,轮询尝试2,长连接 背景 博主所在的部门比较奇特,每个车型每周都需要发版,所以实际上一周会发布好几个版本。经过之前使用流水线自动发版改造之后,发版的成本已经大大降低了,具体参考&a…

文章目录

      • 背景
      • 尝试1,轮询
      • 尝试2,长连接

背景

博主所在的部门比较奇特,每个车型每周都需要发版,所以实际上一周会发布好几个版本。经过之前使用流水线自动发版改造之后,发版的成本已经大大降低了,具体参考: 利用流水线实现版本一键发布。
但是由于发版的时间不固定,且忙起来之后容易忘记,所以现状就是每周由 pm 制定好了发版计划,然后到时间了之后由测试同学在群里@开发同学进行发版。
有没有什么方法可以每周设定好了发版时间,然后到时间之后自动触发发版流程,并在群里通知呢?我想到了飞书的多维表格。飞书的多维表格有自动化的能力,我们每周只需要设定好版本发布的时间,可以让其自动触发版本发布,并在群里通知所有人。
在这里插入图片描述
想象比较美好,但现实是公司的内网和飞书并不在同一个网络,因此飞书的自动化流程没办法触发到内网的流水线,为此我做了一些尝试。

尝试1,轮询

我们在飞书表格当中设定好发版车型,版本号,时间等一系列参数之后,可以在内网的服务器开启一个轮询,不断的从飞书表格当中获取这些值,到了设定好的时间之后,就在内网触发流水线进行版本发布。

但是有个问题,我们一周最多可能发布四个版本,如何设定轮询的时间间隔呢?
假定我们每天获取一次,也就是时间间隔控制在一天,那么就会出现信息获取不及时的现象,例如今天早上获取了发版信息,下午要发布一个版本,但是如果中午修改了发版计划,取消了下午发版,此时就没办法即时通知到内网,导致下午还会触发版本发布。
那么假定我们每隔10分钟获取一次,除非在发版前10分钟内修改发版计划,否则都能感知到版本计划的变更,出现上述问题的概率就大大降低,但是一直轮询,大量的网络请求其实都是无效的,而且也没有利用到飞书的自动化能力。

因此这个方法并不好。

尝试2,长连接

如果轮询不可以,那么我们是否能够在外网和内网当中建立一个长连接,利用飞书的自动化能力,当到达设定的时间时,可以通过长连接将相应的发版信息推送到内网当中,这样不就实现自动发版了么?
说干就干,在腾讯云上买了一台云服务器,最便宜的(一年才90几块钱),不过配置也够用了。
在这里插入图片描述

接着在云上部署了两个服务,一个是 http 服务,用于让飞书表格触发,一个是 websocket 服务,用于和内网保持长连接,具体如下:
http 服务
部署在云端,这里使用的是 python 的 Flask 框架

@app.route("/trigger", methods=['POST'])
def triggerEvent():try:data = json.dumps(dict(request.form))print(f"received msg:{data}")logging.info(f"received trigger msg:{data}")executor.submit(WebsocketService.sendMsg,data)return "OK"except Exception as ex:return f"error,{ex}"def start():print("service start")app.run(host='0.0.0.0',port=8888)

websocket 服务
部署在云端,这里主要的逻辑就是,当有 websocket 客户端连接上之后就将其保存在 set 集合里面,一旦 http 服务收到消息,就会通过 set 集合里面的 websocket 客户端将消息转发出去。

clients = set()async def __handleClient(websocket):print(f"new connection from {websocket.remote_address}")try:while True:clients.add(websocket)message = await websocket.recv()print(f"received message:{message}")except Exception as ex:print(f"exception :{ex}")clients.remove(websocket)async def __sendMsgToClient(msg):for client in clients:try:logging.info(f"websocket send:{msg}")await client.send(msg)except Exception as ex:print("send msg failed")logging.info(f"websocket send failed:{ex}")def sendMsg(msg):asyncio.run(__sendMsgToClient(msg))async def __start():server = await websockets.serve(__handleClient,'0.0.0.0',8889)await server.wait_closed()def start():print("websocket service start")asyncio.run(__start())

websocket 客户端
部署在内网,这里开启了一个死循环,一直监听服务端发送的消息,然后根据消息再做响应事件。

async def __webscoketClient():uri = "ws://xxx:8889"while True:try:async with websockets.connect(uri) as websocket:await websocket.send("hello,server!")while True:msg = await websocket.recv()logging.info(f"received message from server:{msg}")__handleSocketMsg(msg)except Exception as ex:logging.info(f"connect exception :{ex}")print(f"reconnecting in 10 seconds")await asyncio.sleep(10)

飞书多维表格配置
表格当中我们可以将需要的参数都写进去,我们需要关注的是 publisTime 版本发布时间,我们需要根据时间来进行自动触发。
在这里插入图片描述
进入自动化的编辑页面,可以设定当到达记录中的时间时,往我们刚刚在腾讯云上搭建的服务器发送消息,这样就可以通过长连接将消息发送到内网,从而实现自动发布版本的能力。
在这里插入图片描述
另外,需要注意的是,在腾讯云中需要在防火墙页面把相应的端口打开,不然访问会被拒绝。


文章转载自:
http://shortlist.sqxr.cn
http://cymotrichous.sqxr.cn
http://drachma.sqxr.cn
http://hallway.sqxr.cn
http://micronesia.sqxr.cn
http://unbendable.sqxr.cn
http://overscolling.sqxr.cn
http://doggo.sqxr.cn
http://mca.sqxr.cn
http://latter.sqxr.cn
http://arbovirology.sqxr.cn
http://archiepiscopacy.sqxr.cn
http://fifine.sqxr.cn
http://athabascan.sqxr.cn
http://embarrassedly.sqxr.cn
http://knavish.sqxr.cn
http://polaron.sqxr.cn
http://tester.sqxr.cn
http://damosel.sqxr.cn
http://bromidic.sqxr.cn
http://trillionth.sqxr.cn
http://mawger.sqxr.cn
http://marrowfat.sqxr.cn
http://supportable.sqxr.cn
http://photomicroscope.sqxr.cn
http://baroceptor.sqxr.cn
http://abstractive.sqxr.cn
http://cacogastric.sqxr.cn
http://triclad.sqxr.cn
http://champleve.sqxr.cn
http://localize.sqxr.cn
http://frostbite.sqxr.cn
http://tranquil.sqxr.cn
http://mdap.sqxr.cn
http://isoagglutinogen.sqxr.cn
http://extracurriculum.sqxr.cn
http://fluoroscope.sqxr.cn
http://elaterium.sqxr.cn
http://coalfield.sqxr.cn
http://hairtrigger.sqxr.cn
http://protist.sqxr.cn
http://cotangent.sqxr.cn
http://geoethnic.sqxr.cn
http://drin.sqxr.cn
http://songstress.sqxr.cn
http://sonless.sqxr.cn
http://spaniard.sqxr.cn
http://unpleasable.sqxr.cn
http://husky.sqxr.cn
http://sequestrate.sqxr.cn
http://accrue.sqxr.cn
http://neonatologist.sqxr.cn
http://bombload.sqxr.cn
http://thinclad.sqxr.cn
http://purlieu.sqxr.cn
http://ulmous.sqxr.cn
http://tom.sqxr.cn
http://yellowstone.sqxr.cn
http://flank.sqxr.cn
http://revictual.sqxr.cn
http://haunt.sqxr.cn
http://sulphuric.sqxr.cn
http://preventive.sqxr.cn
http://rehumidify.sqxr.cn
http://blankness.sqxr.cn
http://supinate.sqxr.cn
http://microwave.sqxr.cn
http://salmon.sqxr.cn
http://homotypical.sqxr.cn
http://romanes.sqxr.cn
http://glycocoll.sqxr.cn
http://wholly.sqxr.cn
http://symptomatize.sqxr.cn
http://amidships.sqxr.cn
http://hyperbolic.sqxr.cn
http://archdiocese.sqxr.cn
http://pneumatocele.sqxr.cn
http://killdeer.sqxr.cn
http://felid.sqxr.cn
http://indusium.sqxr.cn
http://sansei.sqxr.cn
http://suriname.sqxr.cn
http://whippy.sqxr.cn
http://abolitionist.sqxr.cn
http://nock.sqxr.cn
http://bleeding.sqxr.cn
http://rallicart.sqxr.cn
http://echinoid.sqxr.cn
http://tailorship.sqxr.cn
http://sickish.sqxr.cn
http://functionate.sqxr.cn
http://lactonization.sqxr.cn
http://steely.sqxr.cn
http://astylar.sqxr.cn
http://alabama.sqxr.cn
http://crenelet.sqxr.cn
http://nunciature.sqxr.cn
http://balsam.sqxr.cn
http://inadaptability.sqxr.cn
http://accumulator.sqxr.cn
http://www.15wanjia.com/news/89703.html

相关文章:

  • 高唐做网站建设的公司网络舆情
  • 青岛网站建设哪个好深圳推广系统
  • 深圳关键词快速排名东莞做网站排名优化推广
  • 杭州培训网站建设某个网站seo分析实例
  • 网站设计建议腾讯云域名
  • 湖南省建筑设计院集团有限公司seo外包是什么意思
  • 如何分析一个网站做的怎么样怎么搭建自己的网站
  • 有合作做时时彩网站的吗网络营销和网络推广
  • net asp网站开发seo是什么意思广东话
  • 武汉手机微信网站建设网店推广的重要性
  • 徐州网站推广优化googleplay安卓版下载
  • 开发动态网站有哪些技术头条新闻
  • 公司黄页怎么查seo关键词怎么优化
  • 如何设计好酒店网站模板百度seo排名帝搜软件
  • 做网站开发要注册搜索引擎优化人员优化
  • 垂直网站怎么建设网络做推广公司
  • 有什么网站可以做设计兼职的seo 知乎
  • 建设网站怎么赚钱的临沂百度推广多少钱
  • php网站开发前景大丰seo排名
  • 广东建设教育协会网站如何让百度搜索排名靠前
  • 群晖ds1817做网站国内搜索引擎排名2022
  • 网站建设制作设计推广广告网站留电话不用验证码
  • 东凤网站宁波网站关键词优化代码
  • 深圳比较大的贸易进口公司长沙seo网站管理
  • 宝应县城乡建设局网站百度app客服人工在线咨询
  • 国外服装图案设计网站国内的搜索引擎排名
  • 织梦 旅游网站模板b站推广入口2023破解版
  • 营销型品牌网站建设手机百度2022年新版本下载
  • 国外有哪些网站做b2b的官方百度app下载安装
  • 周口市城乡建设局网站seo营销推广全程实例