Skip to content

Commit

Permalink
Merge pull request #108 from jasper-vdhoven/master
Browse files Browse the repository at this point in the history
Updated naming convention regarding result_sample.py in service development
  • Loading branch information
cccs-kevin committed Jan 16, 2024
2 parents 3cd6fa7 + 73cbc2b commit f313589
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/developer_manual/services/run_your_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ cd ~/git/services/assemblyline-service-sample
From a terminal, run the `run_service_once` module, specifying the service path for the service to run and the path to the file to scan. For this example, we will have the service scan itself.

```shell
python -m assemblyline_v4_service.dev.run_service_once sample.Sample sample.py
python -m assemblyline_v4_service.dev.run_service_once result_sample.Sample result_sample.py
```

The `run_service_once` module creates a directory at the same spot where the file is found with the service name that scanned the file appended to it. In the previous example, the output of the service should be located at `~/git/services/assemblyline-service-sample/sample.py_sample`. The directory will contain a `result.json` file containing the result from the service.

You can view the `result.json` file using the following command:

```shell
cat ~/git/services/assemblyline-service-sample/sample.py_sample/result.json | json_pp
cat ~/git/services/assemblyline-service-sample/result_sample.py_sample/result.json | json_pp
```

It will look something like this:
Expand Down Expand Up @@ -138,7 +138,7 @@ source ~/git/services/venv/bin/activate
cd ~/git/services/assemblyline-service-sample

# Run your service
SERVICE_PATH=sample.Sample python -m assemblyline_v4_service.run_service
SERVICE_PATH=result_sample.Sample python -m assemblyline_v4_service.run_service
```

## Production container mode
Expand Down

0 comments on commit f313589

Please sign in to comment.