Skip to content

mskcc/echo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Echo - Copy Service

Echo is an application for copying files from one location to another. It provides two ways to communicate with the service: RabbitMQ or a REST API.

Usage

git clone https://github.com/mskcc/echo/
cd echo
# Create configuration .env file
docker-compose up

REST API

Service status

GET /status
Response 200 
{
    "message": "Server is running"
}

Copy file request

POST /copy
Body: {
    "source": "/path/to/source/source_file.txt", 
    "destination": "/path/to/source/source_file.txt"
}
Response 202
{
    "id": "`<request_id>`",
    "message": "File copy request accepted with id: `<request_id>`"
    "task": "COPY"
}

Delete file request

POST /delete
Body: {
    "source": "/path/to/source/source_file.txt"
}
Response 202
{
    "id": "`<request_id`",
    "message": "Delete file request accepted with id: `<request_id`",
    "task": "DELETE"
}

RabbitMQ Messages

Copy Message

{
    "id": "`<request_id>`",
    "task": "COPY",
    "source": "/path/to/source/source_file.txt", 
    "destination": "/path/to/source/source_file.txt"
}

Delete Message

{
    "id": "`<request_id>`",
    "task": "DELETE",
    "source": "/path/to/source/source_file.txt", 
}

Response Message

{
    "id": "`<request_id>`",
    "status": `<task_status>`, # success or fail
    "message": `<message>`
}

Configuration

RABBITMQ_URL=amqp://{username}:{password}@{url}:{port}/
API_TOKEN={api_token}
FILE_TASK_QUEUE={task_queue}
CONFIRMATION_QUEUE={confirmation_queue}
NUMBER_OF_WORKERS={number_of_workers}
SERVER_PORT={server_port}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages