Partek Flow Documentation

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The API reference documentation is available here:  REST API Manual for Partek Flow's REST API

The public key and Python libraries are available here:  PartekFlow-REST.zip

...

Generate an authentication token 

An access token can be generated from the System information section of the settings page. 

Image Modified

 

Alternatively, GetToken.py will generate a token.

...

Monitor a folder and upload files as they are created

Code Block
#!/bin/bash

...


inotifywait -m $PATH_TO_MONITOR -e create -e moved_to

...

  while read path action file; do

...

 |
  while read path action file; do
      if [[ $file == *.fastq.gz ]];

...

              echo "Uploading $file"

              python UploadSamples.py -v --server $SERVER --user $USER --password $TOKEN --files $path/$file --project "$PROJECT" 

      fi

  done

 then
              echo "Uploading $file"
              python UploadSamples.py -v --server $SERVER --user $USER --password $TOKEN --files $path/$file --project "$PROJECT" 
      fi
  done

 

Monitor the queue and send a notification if there are too many waiting tasks

Code Block
#!/bin/bash

...


while true;

...

 do
      result=`python QueueStatistics.py --server $SERVER --user $USER --password $TOKEN --max_waiting $MAX_WAITING`

...


      if [ $? -eq 1 ];

...

 then
              /usr/bin/notify-send

...

              exit 1

      fi

      sleep $INTERVAL

 $result
              exit 1
      fi
      sleep $INTERVAL
done

 

 

Additional assistance

 

Rate Macro
allowUsersfalse