Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
Notitications (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 authored Aug 14, 2023
1 parent a232e51 commit 77a4c45
Show file tree
Hide file tree
Showing 66 changed files with 3,646 additions and 1,286 deletions.
2 changes: 1 addition & 1 deletion .drone.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The test runner source for API tests
APITESTS_COMMITID=1788406b5273782d5bad44543ba5b9f94d48370d
APITESTS_COMMITID=7094891f4de381102b05c6503751dc85d82c0782
APITESTS_BRANCH=master
APITESTS_REPO_GIT_URL=https://github.com/owncloud/ocis.git
4 changes: 4 additions & 0 deletions changelog/unreleased/datatx-storage-drivers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Enhancement: Storage drivers setup for datatx

https://github.com/cs3org/reva/pull/3915
https://github.com/cs3org/reva/issues/3914
4 changes: 4 additions & 0 deletions changelog/unreleased/datatx-transfer-size.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Enhancement: Provide data transfer size with datatx share

https://github.com/cs3org/reva/pull/3891
https://github.com/cs3org/reva/issues/2104
13 changes: 13 additions & 0 deletions changelog/unreleased/notifications-framework.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Enhancement: Notifications framework

Adds a notifications framework to Reva.

The new notifications service communicates with the rest of
reva using NATS. It provides helper functions to register new
notifications and to send them.

Notification templates are provided in the configuration files
for each service, and they are registered into the notifications
service on initialization.

https://github.com/cs3org/reva/pull/3825
4 changes: 4 additions & 0 deletions changelog/unreleased/remove-job-on-cancel-transfer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Bugfix: Remove transfer on cancel should also remove transfer job

https://github.com/cs3org/reva/pull/3882
https://github.com/cs3org/reva/issues/3881
1 change: 0 additions & 1 deletion cmd/reva/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ var (
shareUpdateCommand(),
shareListReceivedCommand(),
shareUpdateReceivedCommand(),
transferCreateCommand(),
transferGetStatusCommand(),
transferCancelCommand(),
transferListCommand(),
Expand Down
146 changes: 0 additions & 146 deletions cmd/reva/transfer-create.go

This file was deleted.

2 changes: 2 additions & 0 deletions cmd/revad/runtime/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ import (
_ "github.com/cs3org/reva/pkg/datatx/manager/loader"
_ "github.com/cs3org/reva/pkg/group/manager/loader"
_ "github.com/cs3org/reva/pkg/metrics/driver/loader"
_ "github.com/cs3org/reva/pkg/notification/handler/loader"
_ "github.com/cs3org/reva/pkg/notification/manager/loader"
_ "github.com/cs3org/reva/pkg/ocm/invite/repository/loader"
_ "github.com/cs3org/reva/pkg/ocm/provider/authorizer/loader"
_ "github.com/cs3org/reva/pkg/ocm/share/repository/loader"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,14 @@ transfer-retry -txId fe671ae3-0fbf-4b06-b7df-32418c2ebfcb
```

## 6 Cleanup transfers
Transfers will be removed from the db using the `transfer-cancel` command when the configuration property `remove_on_cancel` of the datatx service has been set to `true` as follows:
Transfers will be removed from the db using the `transfer-cancel` command when the configuration property `remove_transfer_on_cancel` and `remove_transfer_job_on_cancel` of the datatx service and rclone driver respectively have been set to `true` as follows:
```
[grpc.services.datatx]
remove_on_cancel = true
remove_transfer_on_cancel = true
[grpc.services.datatx.txdrivers.rclone]
remove_transfer_job_on_cancel = true
```
Currently this setting is recommended.
Currently this setting is recommended.

*Note that with these settings `transfer-cancel` will remove transfers & jobs even when a transfer cannot actually be cancelled because it was already in an end-state, eg. `finished` or `failed`. So `transfer-cancel` will act like a 'delete' function.
24 changes: 18 additions & 6 deletions examples/datatx/datatx.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ data_transfers_folder = ""
[grpc.services.datatx]
# rclone is currently the only data transfer driver implementation
txdriver = "rclone"
# the shares,transfers db file (default: /var/tmp/reva/datatx-shares.json)
tx_shares_file = ""
# base folder of the data transfers (eg. /home/DataTransfers)
data_transfers_folder = ""
# the storage driver
storagedriver = "json"
# if set to 'true' the transfer will always be removed from the db upon cancel request
# recommended value is true
remove_transfer_on_cancel = true

# rclone driver
[grpc.services.datatx.txdrivers.rclone]
Expand All @@ -27,12 +28,23 @@ auth_pass = "{rclone user secret}"
# "x-access-token" will result in rclone using request header: X-Access-Token: "...token..."
# If not set "bearer" is assumed
auth_header = "x-access-token"
# the transfers(jobs) db file (default: /var/tmp/reva/datatx-transfers.json)
file = ""
# check status job interval in milliseconds
job_status_check_interval = 2000
# the job timeout in milliseconds (must be long enough for big transfers!)
job_timeout = 120000
# the storage driver
storagedriver = "json"
# if set to 'true' the transfer job will always be removed from the db upon transfer cancel request
# recommended value is true
remove_transfer_job_on_cancel = true

[grpc.services.datatx.storagedrivers.json]
# the datatx transfers db file (defaults to: /var/tmp/reva/datatx-transfers.json)
file = ""

[grpc.services.datatx.txdrivers.rclone.storagedrivers.json]
# the transfers jobs db file (defaults to: /var/tmp/reva/transfer-jobs.json)
file = ""

[http.services.ocdav]
# reva supports http third party copy
Expand Down
Loading

0 comments on commit 77a4c45

Please sign in to comment.