Open
Conversation
Member
|
It's a good first implementation, has all the functionality we look for:
However, I would like to see more abstraction, where the listening and pushing is somewhere in the package code at |
lnauta
requested changes
Jul 23, 2025
| from subprocess import Popen, PIPE, CalledProcessError | ||
|
|
||
|
|
||
| def getNextIndex(): |
Member
There was a problem hiding this comment.
I would import getNextIndex if possible
| With the following command, a channel named "test_write" is created that will register write events to the specified folder on dCache. Then, if a write event occurs, a token is created in the "todo" view in the PiCaS database. | ||
|
|
||
| ``` | ||
| python pushEventsTokens.py --folder /pnfs/grid.sara.nl/data/users/username/tape/testdir --tokenfile tokenfile.conf --event write --api https://dcacheview.grid.surfsara.nl:22880/api/v1 |
Member
There was a problem hiding this comment.
using a disk path is probably more reliable for an example (in case a user goes and tries it)
Member
There was a problem hiding this comment.
specify that username in the path is an example
| The file should have status "NEARLINE" (ond not "ONLINE_AND_NEARLINE"). If so, stage this file with: | ||
|
|
||
| ``` | ||
| ada --tokenfile tokenfile.conf --stage /pnfs/grid.sara.nl/data/users/hailih/tape/testfile --api https://dcacheview.grid.surfsara.nl:22880/api/v1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Create a token in PiCaS database when file is written to a dCache directory or staged.
See the advanced example in the README for how to test the functionality.