- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试使用持久功能进行一些数据转换。为此,我有一个 TimerTriggered 函数,它调用一个 Orchestration 函数,然后生成转换事件。
我的问题是,在调用 Orchestration 函数时,它会立即产生大量事件,甚至在到达启动该函数的代码部分之前。我的编排函数应该只启动 3 个事件,因为我的 dataList 仅包含 3 个元素。
但是可以看出,在我下面包含的日志输出中,在调用编排函数之后、包含 context.CallActivityAsync 的循环开始之前,许多事件函数将立即运行
我根本找不到任何原因。启动这么多事件后,我的循环将实际运行并启动我期望的 3 个事件。
定时器触发函数:
[FunctionName("StartupFunc")]
public static async Task Run([TimerTrigger("0 */5 * * * *", RunOnStartup = true, UseMonitor = false)]TimerInfo myStartTimer, [OrchestrationClient] DurableOrchestrationClient orchestrationClient, TraceWriter log)
{
log.Info("*** STARTUP FUNCTION *** - Time triggered");
List<OrchestrationModel> ExportModels = await getData();
log.Info("** Orchestration Start **");
string id = await orchestrationClient.StartNewAsync("OrchestratorFunc", ExportModels);
log.Info("** Orchestration End **");
}
编排功能:
[FunctionName("OrchestratorFunc")]
public static async Task<string> TransformOrchestration([OrchestrationTrigger] DurableOrchestrationContext context, TraceWriter log)
{
var dataList = context.GetInput<List<OrchestrationModel>>();
foreach (var data in dataList)
{
await context.CallActivityAsync<string>("TransformToFormat", new TransformModel(data));
}
}
事件功能:
[FunctionName("TransformToFormat")]
[public static async Task<string> RunTransformation([ActivityTrigger] DurableActivityContext context, TraceWriter log)
{
log.Info($"*** TRANSFORM FUNCTION - ACTIVITY *** executed at: {DateTime.Now} ({context.InstanceId})");
TransformModel = context.GetInput<TransformModel>();
//Do some work with TransformModel
log.Info($"* 1 ({context.InstanceId})");
//Do more work
log.Info($"* 4 ({context.InstanceId})");
return $"return value ({context.InstanceId})");
}
日志输出:
[21/9/2018 03:09:02] Reading host configuration file 'D:\git\TopoAPI\SyncToSQL\bin\Debug\net461\host.json'
[21/9/2018 03:09:02] Host configuration file read:
[21/9/2018 03:09:02] {}
[21/9/2018 03:09:02] Starting Host (HostId=topored-988367233, Version=1.0.11913.0, InstanceId=fe4247ff-d15f-4587-8efe-4c3e53fd776d, ProcessId=22320, AppDomainId=1, Debug=False, ConsecutiveErrors=0, StartupCount=1, FunctionsExtensionVersion=)
[21/9/2018 03:09:02] Loaded custom extension 'BotFrameworkConfiguration'
[21/9/2018 03:09:02] Loaded custom extension 'SendGridConfiguration'
[21/9/2018 03:09:02] Loaded custom extension 'EventGridExtensionConfig'
[21/9/2018 03:09:02] Loaded binding extension 'DurableTaskExtension' from 'referenced by: Method='TransformToRelational.Transform.RunTransformation', Parameter='context'.'
[21/9/2018 03:09:03] registered EventGrid Endpoint = http://localhost:7071/admin/extensions/EventGridExtensionConfig
[21/9/2018 03:09:03] Generating 3 job function(s)
[21/9/2018 03:09:03] Found the following functions:
[21/9/2018 03:09:03] TransformToRelational.Orchestrator.TransformOrchestration
[21/9/2018 03:09:03] TransformToRelational.Startup.Run
[21/9/2018 03:09:03] TransformToRelational.Transform.RunTransformation
[21/9/2018 03:09:03]
[21/9/2018 03:09:03] Host initialized (1353ms)
[21/9/2018 03:09:04] Host lock lease acquired by instance ID '00000000000000000000000059E1D128'.
[21/9/2018 03:09:04] Function started (Id=45f7d798-95a7-46c9-8769-8d17bf7fb18f)
[21/9/2018 03:09:04] Executing 'StartupFunc' (Reason='Timer fired at 2018-09-21T11:09:04.7440997+08:00', Id=45f7d798-95a7-46c9-8769-8d17bf7fb18f)
Debugger listening on [::]:5858
[21/9/2018 03:09:05] Function started (Id=6b83b8f2-0489-4fa0-a9be-9afb5179649c)
[21/9/2018 03:09:05] Executing 'TransformAndFormat' (Reason='', Id=6b83b8f2-0489-4fa0-a9be-9afb5179649c)
[21/9/2018 03:09:05] Function started (Id=c4ffc3ee-b02a-4786-a8ce-a8bb503b4523)
[21/9/2018 03:09:05] Executing 'TransformAndFormat' (Reason='', Id=c4ffc3ee-b02a-4786-a8ce-a8bb503b4523)
[21/9/2018 03:09:06] Function started (Id=ad33ef92-45eb-4759-b3ef-363b7fe95fd5)
[21/9/2018 03:09:06] Executing 'TransformAndFormat' (Reason='', Id=ad33ef92-45eb-4759-b3ef-363b7fe95fd5)
[21/9/2018 03:09:06] Function started (Id=b66452d4-04b8-4f32-b934-4ebcf7cfeed9)
[21/9/2018 03:09:06] Executing 'TransformAndFormat' (Reason='', Id=b66452d4-04b8-4f32-b934-4ebcf7cfeed9)
[21/9/2018 03:09:06] Function started (Id=bc4f7c77-10dc-4a2f-95b2-86de3a7199e6)
[21/9/2018 03:09:06] Executing 'TransformAndFormat' (Reason='', Id=bc4f7c77-10dc-4a2f-95b2-86de3a7199e6)
[21/9/2018 03:09:06] Function started (Id=f4e79a26-7cbb-44e9-a77f-df643990f89a)
[21/9/2018 03:09:06] Executing 'TransformAndFormat' (Reason='', Id=f4e79a26-7cbb-44e9-a77f-df643990f89a)
[21/9/2018 03:09:06] Function started (Id=2098e488-ba76-4684-afcb-31cb8789ee14)
[21/9/2018 03:09:06] Executing 'TransformAndFormat' (Reason='', Id=2098e488-ba76-4684-afcb-31cb8789ee14)
[21/9/2018 03:09:11] Function started (Id=5277d6bf-4024-40b9-b52f-d833d7fb8c81)
[21/9/2018 03:09:12] Function started (Id=476fe0b2-d577-4e97-9880-8cb7795efd44)
[21/9/2018 03:10:14] Executing 'TransformAndFormat' (Reason='', Id=476fe0b2-d577-4e97-9880-8cb7795efd44)
[21/9/2018 03:10:14] Executing 'TransformAndFormat' (Reason='', Id=5277d6bf-4024-40b9-b52f-d833d7fb8c81)
[21/9/2018 03:10:14] Function started (Id=05799036-9476-450f-abb6-f0fff061b225)
[21/9/2018 03:10:14] Function started (Id=3d486a91-17ff-4d80-86ee-74dc88599470)
[21/9/2018 03:10:14] Executing 'TransformAndFormat' (Reason='', Id=3d486a91-17ff-4d80-86ee-74dc88599470)
[21/9/2018 03:10:14] Function started (Id=110e9add-d7f5-4f5f-a0ef-242f4438ea39)
[21/9/2018 03:10:14] Executing 'TransformAndFormat' (Reason='', Id=110e9add-d7f5-4f5f-a0ef-242f4438ea39)
[21/9/2018 03:10:14] Function started (Id=022e6a88-8c54-4ea7-9f27-154200cd40f4)
[21/9/2018 03:10:14] Executing 'TransformAndFormat' (Reason='', Id=022e6a88-8c54-4ea7-9f27-154200cd40f4)
[21/9/2018 03:10:14] Function started (Id=f0c3e8a2-24f2-4e09-9043-3d50c1ecba16)
[21/9/2018 03:10:14] Executing 'TransformAndFormat' (Reason='', Id=f0c3e8a2-24f2-4e09-9043-3d50c1ecba16)
[21/9/2018 03:10:14] Function started (Id=99218445-2ce5-494a-a654-f8d4fbf11a95)
[21/9/2018 03:10:14] Executing 'TransformAndFormat' (Reason='', Id=99218445-2ce5-494a-a654-f8d4fbf11a95)
[21/9/2018 03:10:14] Executing 'TransformAndFormat' (Reason='', Id=05799036-9476-450f-abb6-f0fff061b225)
[21/9/2018 03:10:14] Function started (Id=a4f91185-6048-4d4a-b262-72d883af0425)
[21/9/2018 03:10:14] Executing 'TransformAndFormat' (Reason='', Id=a4f91185-6048-4d4a-b262-72d883af0425)
[21/9/2018 03:10:14] Function started (Id=1e981e76-c1f3-44c7-acff-1d4f3434b714)
[21/9/2018 03:10:14] Executing 'TransformAndFormat' (Reason='', Id=1e981e76-c1f3-44c7-acff-1d4f3434b714)
[21/9/2018 03:10:14] Function started (Id=28c01a28-762f-4ac6-99b6-04d203aa8494)
[21/9/2018 03:10:14] Executing 'TransformAndFormat' (Reason='', Id=28c01a28-762f-4ac6-99b6-04d203aa8494)
[21/9/2018 03:10:14] Function started (Id=797a4709-e6b7-499f-9d59-3341d6f07978)
[21/9/2018 03:10:14] Executing 'TransformAndFormat' (Reason='', Id=797a4709-e6b7-499f-9d59-3341d6f07978)
[21/9/2018 03:10:14] Function started (Id=8441563d-c2da-4524-b7e6-1f4cc020efbc)
[21/9/2018 03:10:14] Executing 'TransformAndFormat' (Reason='', Id=8441563d-c2da-4524-b7e6-1f4cc020efbc)
[21/9/2018 03:10:14] Function started (Id=6c8000c0-5ec2-4ca8-be56-95330ca23765)
[21/9/2018 03:10:14] Executing 'TransformAndFormat' (Reason='', Id=6c8000c0-5ec2-4ca8-be56-95330ca23765)
[21/9/2018 03:10:14] Function started (Id=27c68235-e52b-492c-a8bc-45e91b3929d1)
[21/9/2018 03:10:14] Executing 'TransformAndFormat' (Reason='', Id=27c68235-e52b-492c-a8bc-45e91b3929d1)
[21/9/2018 03:10:15] *** STARTUP FUNCTION *** - Time triggered
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (51f1ef294cf04351804736cae5f22a07)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (76e3044b7a0849c18991b10fd6b34075)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (ced17a0553c14d138c9feb7b72e44b50)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (35cc4b30355049938c59aa8880d0203e)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (d166b287697140b5beb80ba02109cfcb)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (a8afa4ebc24c4a5596d36e32f7acb687)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (57ef1d9f3e6649a9bc6f1628126b7f38)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (bd3e3a2751cb48438c2465540dc61e97)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (40dfd72548134412901a5ff2f7566cc2)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (93b6ed9c00b04d9fb626c09d0b696d9c)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (8fd9fb5c1ea94954896acf3780add1ad)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (66401ebba4794869aebf043caab8c427)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (fb6be8992f984e24b61237f3082ff54e)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (e6c732ab6b7c4f57892ff7d95c952c8b)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (90de278cf5a84cb981672a1c3432a5e4)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (30825f010c3d4982a10f3a034d9adef7)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (47e7aea0bc1e47fe970ef43bd6409baf)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (1cca0179bdcc438b84a0a3b82a8ad807)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (42ac98ba32e641afb92cd72cb4728b58)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (f833676170834d4a936544b4ce6ba9d2)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (f366d84806e34503bdb4ba7d982711aa)
[21/9/2018 03:10:15] *** TRANSFORM FUNCTION - ACTIVITY *** executed at: 21/9/2018 11:10:15 (d55121d270394755b88b4f34cd3b3c97)
[21/9/2018 03:10:17] ** Orchestration Start **
[21/9/2018 03:10:17] * 1 (57ef1d9f3e6649a9bc6f1628126b7f38)
[21/9/2018 03:10:17] * 1 (93b6ed9c00b04d9fb626c09d0b696d9c)
[21/9/2018 03:10:17] * 1 (ced17a0553c14d138c9feb7b72e44b50)
[21/9/2018 03:10:17] * 1 (d166b287697140b5beb80ba02109cfcb)
[21/9/2018 03:10:17] * 1 (51f1ef294cf04351804736cae5f22a07)
[21/9/2018 03:10:17] * 1 (40dfd72548134412901a5ff2f7566cc2)
[21/9/2018 03:10:17] ** Orchestration End **
[21/9/2018 03:10:17] Function completed (Success, Id=45f7d798-95a7-46c9-8769-8d17bf7fb18f, Duration=72573ms)
[21/9/2018 03:10:17] Executed 'StartupFunc' (Succeeded, Id=45f7d798-95a7-46c9-8769-8d17bf7fb18f)
[21/9/2018 03:10:17] The next 5 occurrences of the schedule will be:
[21/9/2018 03:10:17] 21/9/2018 11:15:00
[21/9/2018 03:10:17] 21/9/2018 11:20:00
[21/9/2018 03:10:17] 21/9/2018 11:25:00
[21/9/2018 03:10:17] 21/9/2018 11:30:00
[21/9/2018 03:10:17] 21/9/2018 11:35:00
[21/9/2018 03:10:17] * 1 (76e3044b7a0849c18991b10fd6b34075)
[21/9/2018 03:10:17] * 1 (35cc4b30355049938c59aa8880d0203e)
[21/9/2018 03:10:17] * 1 (a8afa4ebc24c4a5596d36e32f7acb687)
[21/9/2018 03:10:17] * 1 (bd3e3a2751cb48438c2465540dc61e97)
[21/9/2018 03:10:17] * 1 (8fd9fb5c1ea94954896acf3780add1ad)
[21/9/2018 03:10:17] * 1 (66401ebba4794869aebf043caab8c427)
[21/9/2018 03:10:17] * 1 (fb6be8992f984e24b61237f3082ff54e)
[21/9/2018 03:10:17] * 1 (e6c732ab6b7c4f57892ff7d95c952c8b)
[21/9/2018 03:10:17] * 1 (90de278cf5a84cb981672a1c3432a5e4)
[21/9/2018 03:10:17] * 1 (30825f010c3d4982a10f3a034d9adef7)
[21/9/2018 03:10:17] * 1 (47e7aea0bc1e47fe970ef43bd6409baf)
[21/9/2018 03:10:17] * 1 (1cca0179bdcc438b84a0a3b82a8ad807)
[21/9/2018 03:10:17] * 1 (42ac98ba32e641afb92cd72cb4728b58)
[21/9/2018 03:10:17] * 1 (f833676170834d4a936544b4ce6ba9d2)
[21/9/2018 03:10:17] * 1 (f366d84806e34503bdb4ba7d982711aa)
[21/9/2018 03:10:17] * 1 (d55121d270394755b88b4f34cd3b3c97)
最佳答案
首先,不要使用 RunOnStartup = true
作为计时器触发器。它将在未来的版本中删除,因为它会给人们带来很多问题和困惑。这可能与您遇到的问题有关。
您所描述的内容听起来像是您过去创建了一堆尚未完成的编排,并且这些事件执行对应于这些旧的、未完成的编排。编排是持久且长期运行的,因此即使您关闭函数应用并重新启动它,它们也会继续尝试运行,直到完成或失败。
如果您想从头开始,请更改 task hub 的名称。或删除 Azure 存储队列中的所有消息。
关于c# - Azure 耐用功能。编排会产生许多不需要的事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52438156/
我正在尝试用 C 语言编写一个使用 gstreamer 的 GTK+ 应用程序。 GTK+ 需要 gtk_main() 来执行。 gstreamer 需要 g_main_loop_run() 来执行。
我已经使用 apt-get 安装了 opencv。我得到了以下版本的opencv2,它工作正常: rover@rover_pi:/usr/lib/arm-linux-gnueabihf $ pytho
我有一个看起来像这样的 View 层次结构(基于其他答案和 Apple 的使用 UIScrollView 的高级 AutoLayout 指南): ScrollView 所需的2 个步骤是: 为 Scr
我尝试安装 udev。 udev 在 ./configure 期间给我一个错误 --exists: command not found configure: error: pkg-config and
我正在使用 SQLite 3。我有一个表,forums,有 150 行,还有一个表,posts,有大约 440 万行。每个帖子都属于一个论坛。 我想从每个论坛中选择最新帖子的时间戳。如果我使用 SEL
使用 go 和以下包: github.com/julienschmidt/httprouter github.com/shwoodard/jsonapi gopkg.in/mgo.v2/bson
The database仅包含 2 个表: 钱包(100 万行) 事务(1500 万行) CockroachDB 19.2.6 在 3 台 Ubuntu 机器上运行 每个 2vCPU 每个 8GB R
我很难理解为什么在下面的代码中直接调用 std::swap() 会导致编译错误,而使用 std::iter_swap 编译却没有任何错误. 来自 iter_swap() versus swap() -
我有一个非常简单的 SELECT *用 WHERE NOT EXISTS 查询条款。 SELECT * FROM "BMAN_TP3"."TT_SPLDR_55E63A28_59358" SELECT
我试图按部分组织我的 .css 文件,我需要从任何文件访问文件组中的任何类。在 Less 中,我可以毫无问题地创建一个包含所有文件导入的主文件,并且每个文件都导入主文件,但在 Sass 中,我收到一个
Microsoft.AspNet.SignalR.Redis 和 StackExchange.Redis.Extensions.Core 在同一个项目中使用。前者需要StackExchange.Red
这个问题在这里已经有了答案: Updating from Rails 4.0 to 4.1 gives sass-rails railties version conflicts (4 个答案) 关
我们有一些使用 Azure DevOps 发布管道部署到的现场服务器。我们已经使用这些发布管道几个月了,没有出现任何问题。今天,我们在下载该项目的工件时开始出现身份验证错误。 部署组中的节点显示在线,
Tip: instead of creating indexes here, run queries in your code – if you're missing any indexes, you
你能解释一下 Elm 下一个声明中的意思吗? (=>) = (,) 我在 Elm architecture tutorial 的例子中找到了它 最佳答案 这是中缀符号。实际上,这定义了一个函数 (=>
我需要一个 .NET 程序集查看器,它可以显示低级详细信息,例如元数据表内容等。 最佳答案 ildasm 是 IL 反汇编程序,具有低级托管元数据 token 信息。安装 Visual Studio
我有两个列表要在 Excel 中进行比较。这是一个很长的列表,我需要一个 excel 函数或 vba 代码来执行此操作。我已经没有想法了,因此转向你: **Old List** A
Closed. This question does not meet Stack Overflow guidelines。它当前不接受答案。 想要改善这个问题吗?更新问题,以便将其作为on-topi
我正在学习 xml 和 xml 处理。我无法很好地理解命名空间的存在。 我了解到命名空间帮助我们在 xml 中分离相同命名的元素。我们不能通过具有相同名称的属性来区分元素吗?为什么命名空间很重要或需要
我搜索了 Azure 文档、各种社区论坛和 google,但没有找到关于需要在公司防火墙上打开哪些端口以允许 Azure 所有组件(blob、sql、compute、bus、publish)的简洁声明
我是一名优秀的程序员,十分优秀!