Skip to content

Instantly share code, notes, and snippets.

@xximjasonxx
Created February 16, 2021 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xximjasonxx/b003ead38236bf8acde477371c858cfc to your computer and use it in GitHub Desktop.
Save xximjasonxx/b003ead38236bf8acde477371c858cfc to your computer and use it in GitHub Desktop.
[FunctionName("IndexChannel")]
public async Task IndexChannel(
[QueueTrigger(Constants.QUEUE_CLIPSINDEX, Connection = Constants.TABLE_STORAGE_CONNECTION)] string channelId,
[DurableClient] IDurableOrchestrationClient starter,
ILogger logger)
{
// are we already indexing?
var status = await starter.GetStatusAsync($"{channelId}-index");
if (status == null)
{
await starter.StartNewAsync(
"Orchestrate_Indexing",
$"{channelId}-index",
new IndexChannelInput() { ChannelId = channelId});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment