Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File-Sort

A simple Temporal Workflow that moves files from one directory to another with some subdirectories.

EXPERIMENTAL

This repo is mainly meant for testing how temporal works and doing some hands on learning.

Setup

For running locally, set the following ENV vars:

FROM_DIR="/your/path"
TO_DIR="/your/path"
TEMPORAL_HOSTPORT="your-ip:7233" # defaults to localhost:7233
TASK_QUEUE_NAME="your-queue-name" # defaults to file-sort-queue

Alternatively use the docker-compose.yaml.

Components

Trigger

Simple for loop checking the $FROM_DIR and triggering the temporal workflow.

Workflow

The FileSortWorkflow which just has a single activity for now:

  • MoveFileActivity

Action

The MoveFileActivity which moves a file from the $FROM_DIR to a directory below the $TO_DIR based on the file extention.

  • images -> $TO_DIR/images
  • documents -> $TO_DIR/documents
  • videos -> $TO_DIR/videos
  • other -> $TO_DIR/other

About

A simple Temporal Workflow that moves files from one directory to another with some subdirectories.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages