微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

使用 GUI 执行时 OpenStack Mistral 工作流错误

如何解决使用 GUI 执行时 OpenStack Mistral 工作流错误

我在 OpenStack(wallaby) devstack 环境中执行 OpenStack simple misral 工作流时出错。虽然我可以从 CLI 命令执行工作流并获得成功但是如果我用 GUI 尝试同样的事情它会失败

import logging
import asyncio
import sqlite3
import time
import aioschedule as schedule
import os

from sys import exit
from aiogram import Bot,dispatcher,executor,types


logging.basicConfig(level=logging.INFO)
log = logging.getLogger('broadcast')

API_KEY = os.getenv('API_KEY')
if not API_KEY:
    exit("Error: no token provided")

bot = Bot(token=API_KEY,parse_mode=types.ParseMode.HTML)
dp = dispatcher(bot)


@dp.message_handler()
async def mail_one():
    # connecting to the database and getting a list of user_ids
    con = sqlite3.connect('database.db')
    cur = con.cursor()
    cur.execute("SELECT user_id FROM users WHERE mail1 = False")
    temp = cur.fetchall()
    users_to_mail_one = [user[0] for user in temp]

    # sending our messages + a bunch of possible exceptions
    for user_id in users_to_mail_one:
        try:
            await bot.send_message(chat_id=user_id,text="Good morning! Here's part one of our mailing list.")
            await bot.send_message(chat_id=user_id,text="<i>Blah blah...</i> Some info here.")
            await bot.send_message(chat_id=user_id,text="Have a nice day.")
        except exceptions.BotBlocked:
            log.error(f"Target [ID:{user_id}]: blocked by user")
        except exceptions.ChatNotFound:
            log.error(f"Target [ID:{user_id}]: invalid user ID")
        except exceptions.RetryAfter as e:
            log.error(
                f"Target [ID:{user_id}]: Flood limit is exceeded. Sleep {e.timeout} seconds.")
            await asyncio.sleep(e.timeout)
            return await send_message(user_id,text)  # Recursive call
        except exceptions.UserDeactivated:
            log.error(f"Target [ID:{user_id}]: user is deactivated")
        except exceptions.TelegramAPIError:
            log.exception(f"Target [ID:{user_id}]: Failed")
        else:
            log.info(f"Target [ID:{user_id}]: success")

    # updating the mail1 status in the database to make sure it doesn't get sent again
    cur.execute("UPDATE users SET mail1 = True WHERE mail1 = False")
    con.commit()
    con.close()
    return schedule.CancelJob


async def scheduler():
    schedule.every().day.at('10:00').do(mail_one)
    while True:
        await schedule.run_pending()
        await asyncio.sleep(1)


async def on_startup(_):
    asyncio.create_task(scheduler())

if __name__ == "__main__":
    executor.start_polling(dp,skip_updates=True,on_startup=on_startup)

但是在 GUI 中执行时我得到 **

执行缺少字段“workflow_identifier”

**

enter image description here

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。