Get support for sagikazarmark/temporal-intro-workshop
If you're new to LTH, please see our FAQ for more information on what it is we do.
Support Options
Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:
View Open IssuesTake a look to see if anyone else has experienced the same issue as you and if they managed to solve it.
Open an IssueMake sure to read any relevant guidelines for opening issues on this repo before posting a new issue.
Sponsor directlyCheck out the page and see if there are any options to sponsor this project or it's developers directly.
sagikazarmark/temporal-intro-workshop
Temporal Intro Workshop
This repository contains example code for my Temporal Intro Workshop. You can create your own Workshop with my Workshop template.
Record: https://youtu.be/UwdGmdTO3Ts
Record (HUN): https://youtu.be/IGAnWQ52xOI
Prerequisites
Alternatively, install nix and direnv, then run direnv allow
once you checked out the repository.
Note: you should still install Docker using your native package manager.
Usage
- Checkout this repository
- Run
make up
- Wait for Temporal to start
- Check if Temporal is running with
make ps
- Start a new shell with
make shell
Alternatively, you can use the following alias for the tctl
commands instead of opening a new shell:
alias tctl='docker compose exec --profile cli temporal-admin-tools tctl'
Running a workflow using the CLI
You can run a workflow using the CLI with the following command:
tctl workflow run --taskqueue workshop --execution_timeout 60 --workflow_type WORKFLOW_TYPE -i 'arg1 arg2...'
As a best practice, workflows generally have a single input struct (to remain compatible with other languages). By default, Temporal uses JSON encoding, so such workflow execution looks like this:
tctl workflow run --taskqueue workshop --execution_timeout 60 --workflow_type example01 -i '{"A": 1, "B": 2}'
You can shorten the command a lot by using shorthands for commands and options:
tctl wf run --tq workshop --et 60 --wt example01 -i '{"A": 1, "B": 2}'
Last, but not least, if you want to start a workflow without waiting for its result,
you can do so by using the start
command instead of run
:
tctl wf start --tq workshop --et 60 --wt example01 -i '{"A": 1, "B": 2}'
Quering workflow state using the CLI
Workflows can register query handlers to expose state about themselves. You can query that state using the following command:
tctl workflow query --workflow_id 72daa600-3cac-49b0-9e86-277a47c80a87 --query_type current_number
Or using a shorter version:
tctl wf query --wid 72daa600-3cac-49b0-9e86-277a47c80a87 --qt current_number
There is a special query type called __stack_trace
that gives you the current stack trace of the workflow.
Useful if a workflow is stuck for a long time and you want to check where it stopped.
Signaling a workflow using the CLI
Workflows can register query handlers to expose state about themselves. You can query that state using the following command:
tctl workflow signal --workflow_id 72daa600-3cac-49b0-9e86-277a47c80a87 --name set_number --input '2'
Or using a shorter version:
tctl wf signal --wid 72daa600-3cac-49b0-9e86-277a47c80a87 -n set_number -i '2'
There is a special query type called __stack_trace
that gives you the current stack trace of the workflow.
Useful if a workflow is stuck for a long time and you want to check where it stopped.
Cleaning up
Once you are finished with the workshop, you can clean up all resources (containers) by running the following command:
make down
Development
Make sure nix and direnv are installed, then run direnv allow
.
To work on the slides, run make slides
.
It will open a browser window and automatically refresh the page when you make changes to the slides.
License
The MIT License (MIT). Please see License File for more information.
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated
p-e622a1a2